Connecting to DB2 via DAO from a Visual C++ program
I'm trying to access a DB2 database version 7 via Microsoft's Jet DB Engine
using DAO in a VC++ 6.0 program that's running in Windows 2000. The program
was able to open the database but when it tried to create a recordset, it
is returning a message that says: The Microsoft Jet database engine cannot
find the input table or query string.
Does anybody know what's causing this problem? Thanks in advance for your
help.
[468 byte] By [
alex] at [2007-11-9 18:51:53]

# 1 Re: Connecting to DB2 via DAO from a Visual C++ program
Alex,
I've connected to to DB2 version 7 with C++ program using the ODBC Driver
for DB2. Unfortunately I ran into a lot of problems (especially early on).
One thing you might want to check is the Schema of the table that you are
working with. You can either qualify the tables in your SQL statements (i.e.
SCHEMA.TABLE) or you can send a command to set the schema:
m_database.ExecuteSQL("SET CURRENT SCHEMA = 'DBO'");
Another is there are some case sensitivity issues at times when accessing
information. Hopefully this helps. Good luck.
Dave
"alex" <atabilog@yahoo.com> wrote:
>
>I'm trying to access a DB2 database version 7 via Microsoft's Jet DB Engine
>using DAO in a VC++ 6.0 program that's running in Windows 2000. The program
>was able to open the database but when it tried to create a recordset, it
>is returning a message that says: The Microsoft Jet database engine cannot
>find the input table or query string.
>
>Does anybody know what's causing this problem? Thanks in advance for your
>help.