|
-
April 23rd, 1999, 12:29 PM
#1
ADO Control wrapper class
I am trying to connect an ADO control to a table at runtime. ClassWizard generated a wrapper class and I tried the following:
m_Adodc.SetConnectionString((LPCSTR)"ODBC;DSN=MQIS");
m_Adodc.SetUserName((LPCSTR)"vbocan");
m_Adodc.SetPassword((LPCSTR)"");
m_Adodc.SetCommandType(2); //Table
m_Adodc.SetRecordSource((LPCSTR)"_Prefix");
When running the program, the ADO control is disabled and the datagrid linked to it shows nothing. If I do the same operations at design time (setting properties from ADO's configuration panels) everything works ok.
Could someone tell me what's going on?
I am new to DB-programming in VC++, C++ Builder is so much easier...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|