Click here to Skip to main content
15,887,911 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MovePrev() can't works Pin
David Crow1-Mar-06 3:27
David Crow1-Mar-06 3:27 
GeneralRe: MovePrev() can't works Pin
mikobi1-Mar-06 20:05
mikobi1-Mar-06 20:05 
GeneralPlease help me Pin
J51219826-Mar-06 19:21
J51219826-Mar-06 19:21 
GeneralRe: Please help me Pin
mikobi6-Mar-06 22:58
mikobi6-Mar-06 22:58 
GeneralRe: Please help me Pin
J51219827-Mar-06 2:59
J51219827-Mar-06 2:59 
GeneralRe: Please help me Pin
mikobi7-Mar-06 20:37
mikobi7-Mar-06 20:37 
GeneralRe: Please help me Pin
mikobi7-Mar-06 20:49
mikobi7-Mar-06 20:49 
GeneralRe: Please help me Pin
J51219827-Mar-06 22:35
J51219827-Mar-06 22: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 18:49
Yuthav28-Feb-06 18:49 
AnswerRe: riends,How to create an Installable version of our project Pin
Cool Ju28-Feb-06 19:39
Cool Ju28-Feb-06 19:39 
Question#error directive Pin
QuickDeveloper28-Feb-06 18:47
QuickDeveloper28-Feb-06 18:47 
AnswerRe: #error directive Pin
Nibu babu thomas28-Feb-06 19:12
Nibu babu thomas28-Feb-06 19:12 
GeneralRe: #error directive Pin
QuickDeveloper28-Feb-06 19:21
QuickDeveloper28-Feb-06 19:21 
QuestionRe: #error directive Pin
Nibu babu thomas28-Feb-06 19:23
Nibu babu thomas28-Feb-06 19:23 
AnswerRe: #error directive Pin
QuickDeveloper28-Feb-06 19:31
QuickDeveloper28-Feb-06 19:31 
GeneralRe: #error directive Pin
Nibu babu thomas28-Feb-06 19:36
Nibu babu thomas28-Feb-06 19:36 
QuestionRe: #error directive Pin
David Crow1-Mar-06 3:30
David Crow1-Mar-06 3:30 
Questionriends,How to create an Installable version of our project Pin
Yuthav28-Feb-06 18:47
Yuthav28-Feb-06 18:47 
QuestionCalling opengl's DrawGLScene() function in an MFC window Pin
adiilah28-Feb-06 18:33
adiilah28-Feb-06 18:33 
QuestionHow to implement List View Control Pin
janisha28-Feb-06 18:14
janisha28-Feb-06 18:14 
AnswerRe: How to implement List View Control Pin
Ryan Binns28-Feb-06 18:19
Ryan Binns28-Feb-06 18:19 
QuestionWininet: Copy file to web directory Pin
Anilkumar K V28-Feb-06 18:08
Anilkumar K V28-Feb-06 18:08 
QuestionLengthy initializing Pin
Waldermort28-Feb-06 17:38
Waldermort28-Feb-06 17:38 
AnswerRe: Lengthy initializing Pin
jigneshrpatel28-Feb-06 17:44
jigneshrpatel28-Feb-06 17:44 
GeneralRe: Lengthy initializing Pin
Waldermort28-Feb-06 17:49
Waldermort28-Feb-06 17: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.