>odbc???????
Yes, you can.
>I have simplified it to the code below in Microsoft Visual C++. It is
>still giving me the same error
I can't help you with the VC++ syntax, but here's how it works using ADO in VBScript:
Option Explicit Const adUseClient = 3 Const adOpenKeyset = 1 Const adLockOptimistic = 3 Dim con, rst Set con = CreateObject("ADODB.Connection") con.CursorLocation = adUseClient con.Open "DSN=EsconaTutorial;UID=MASTER;PWD=control;" Set rst = CreateObject("ADODB.Recordset") rst.Open _ "SELECT COUNT(*) AS n FROM CLIENT", _ con, adOpenKeyset, adLockOptimistic MsgBox rst("n"), vbOkOnly, "Query Result" rst.Close Set rst = Nothing con.Close Set con = Nothing
>Maybe the problem is the MFC exe file I'm creating uses DLLs???
The article you cited had to do with compiling VB code _into_ a DLL that was called from the Maximizer application itself. That particular code wouldn't work properly in a DLL, although the same code compiled into an EXE _would_ work, and that EXE certainly did use other DLLs.
I'm not sure what data access method you are trying to use; perhaps Maximizer ODBC doesn't like it. Try using ADO and see if that works.
>I'm not sure why the Persuasive driver can't find a table that does
>exist???
Pervasive ODBC uses different object names than Maximizer ODBC. The 'AMGR_Client' view in Pervasive ODBC corresponds to the 'CLIENT' table in Maximizer ODBC. Note, however, that using Pervasive ODBC has its own quirks....