Click here to Skip to main content
15,846,726 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MovePrev() can't works Pin
David Crow1-Mar-06 4:27
David Crow1-Mar-06 4:27 
GeneralRe: MovePrev() can't works Pin
mikobi1-Mar-06 21:05
mikobi1-Mar-06 21:05 
GeneralPlease help me Pin
J51219826-Mar-06 20:21
J51219826-Mar-06 20:21 
GeneralRe: Please help me Pin
mikobi6-Mar-06 23:58
mikobi6-Mar-06 23:58 
GeneralRe: Please help me Pin
J51219827-Mar-06 3:59
J51219827-Mar-06 3:59 
GeneralRe: Please help me Pin
mikobi7-Mar-06 21:37
mikobi7-Mar-06 21:37 
GeneralRe: Please help me Pin
mikobi7-Mar-06 21:49
mikobi7-Mar-06 21:49 
GeneralRe: Please help me Pin
J51219827-Mar-06 23:35
J51219827-Mar-06 23:35 
hello mikobi,
i like to display the table in my text area on clicking ok button.

my database server is in ist17
my database name is IstEncoder
my table is user_details

is my path is correct ?

what modificaton i should do in your code.

thanks in advance

=============================================================================void CDatabaseDlg::OnOK()
{
// TODO: Add extra validation here
bool bsavevalidation = true;
CWnd::UpdateData(bsavevalidation);
HRESULT hr;
CDataSource db;
CDBPropSet dbinit(DBPROPSET_DBINIT);

CString databas = "ist17";


CString strItem;
int k = 0;
CSession session;
CString strCommand,strSql;
dbinit.AddProperty(DBPROP_AUTH_PASSWORD, OLESTR("yhwha"));
dbinit.AddProperty(DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, false);
dbinit.AddProperty(DBPROP_AUTH_USERID, OLESTR("sa"));
dbinit.AddProperty(DBPROP_INIT_CATALOG, OLESTR("STOCK"));
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, databas);
dbinit.AddProperty(DBPROP_INIT_LCID, (long)1036);
dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
hr = db.Open(_T("SQLOLEDB.1"), &dbinit);
if (FAILED(hr))
{
AfxMessageBox("impossible d'ouvrir la baseo");
}
else
{
hr = session.Open(db);

if (FAILED(hr))
{
AfxMessageBox("session non Ouverte");
}
else
{
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_CANFETCHBACKWARDS, true);
propset.AddProperty(DBPROP_IRowsetScroll, true);
propset.AddProperty(DBPROP_IRowsetChange, true);
propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE );
bool bsavevalidation = true;
CWnd::UpdateData(bsavevalidation);
CCommand >cmde ;
CCommand >req ;
CCommand >dem ;
CCommand >det ;
CCommand >liv ;
CString str1,str2,str3,str4,str5,str6,str7,str8,str9,str0 = "";
int i = 0;
strCommand = "select * from detcmde where numreq = '%s'";
strSql.Format(strCommand,m_numcmde);
}

CDialog::OnOK();
}

}
=============================================================================

My Error -------------------------------------------------------------------------------------------------------------------------------------------------
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2065: 'm_numcmde' : undeclared identifier



JAYARAJ
Questionriends,How to create an Installable version of our project Pin
Yuthav28-Feb-06 19:49
Yuthav28-Feb-06 19:49 
AnswerRe: riends,How to create an Installable version of our project Pin
Cool Ju28-Feb-06 20:39
Cool Ju28-Feb-06 20:39 
Question#error directive Pin
QuickDeveloper28-Feb-06 19:47
QuickDeveloper28-Feb-06 19:47 
AnswerRe: #error directive Pin
Nibu babu thomas28-Feb-06 20:12
Nibu babu thomas28-Feb-06 20:12 
GeneralRe: #error directive Pin
QuickDeveloper28-Feb-06 20:21
QuickDeveloper28-Feb-06 20:21 
QuestionRe: #error directive Pin
Nibu babu thomas28-Feb-06 20:23
Nibu babu thomas28-Feb-06 20:23 
AnswerRe: #error directive Pin
QuickDeveloper28-Feb-06 20:31
QuickDeveloper28-Feb-06 20:31 
GeneralRe: #error directive Pin
Nibu babu thomas28-Feb-06 20:36
Nibu babu thomas28-Feb-06 20:36 
QuestionRe: #error directive Pin
David Crow1-Mar-06 4:30
David Crow1-Mar-06 4:30 
Questionriends,How to create an Installable version of our project Pin
Yuthav28-Feb-06 19:47
Yuthav28-Feb-06 19:47 
QuestionCalling opengl's DrawGLScene() function in an MFC window Pin
adiilah28-Feb-06 19:33
adiilah28-Feb-06 19:33 
QuestionHow to implement List View Control Pin
janisha28-Feb-06 19:14
janisha28-Feb-06 19:14 
AnswerRe: How to implement List View Control Pin
Ryan Binns28-Feb-06 19:19
Ryan Binns28-Feb-06 19:19 
QuestionWininet: Copy file to web directory Pin
Anilkumar K V28-Feb-06 19:08
Anilkumar K V28-Feb-06 19:08 
QuestionLengthy initializing Pin
Waldermort28-Feb-06 18:38
Waldermort28-Feb-06 18:38 
AnswerRe: Lengthy initializing Pin
jigneshrpatel28-Feb-06 18:44
jigneshrpatel28-Feb-06 18:44 
GeneralRe: Lengthy initializing Pin
Waldermort28-Feb-06 18:49
Waldermort28-Feb-06 18:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.