I got a strange problem I dont know how to solve, so I hope you might help me:
I got a database on an AS400 and I'm trying to access that database from a WinXP-client. I created an ODBC-System-DNS entry for that database with the 'IBM Client access ODBC Driver (32bit)'.
This seems to work finde, with Microsoft Access I can view all tables/data in the Database using that System DNS.
I'm now trying to access that database from a vb-programm. I created there a DataEnvironment which contains a DEConnection to that Database, using the 'Microsoft OLE DB Provider for ODBC Drivers'. If I do a test connect there, it says that the connections is established. But if I try to execute any SQL-statement, like 'SELECT * FROM ESKOPF00' (in ms access I can see all the data of the table ESKOPF00) it gives me the following error:
[IBM]Client Access Express ODBC-Treiber (32bit)][DB2/400 SQL]SQL0204 - ESKOPF00 der Art *File in QGPL nicht gefunden. (-2147217865)
translated in english this means something like:
[IBM]Client Access Express ODBC-Driver (32bit)][DB2/400 SQL]SQL0204 - ESKOPF00 the type(?) *File in QGPL not found. (-2147217865)
My DEConnection in VB has the following properties:
ConnectionSource=Provider=MSDASQL.1;Password=pass; Persist Security Info=True;User ID=userid;Data Source=reka_a620_01
CursorLocation=3 - adUseClient
DesignPromptBehavior=2 - adPromptComplete
RunPromptBehavior=2 - adPromptComplete
In the code, I try to access the DB like this:
If rsView20.State = adStateOpen Then
SQLQuery = "SELECT * FROM ESKOPF00"
rsView20.Open SQLQuery, envAS4_01.reka_a620_01
which works perfectly with a db residing on a win 2k server.
I think it must be some settings in the vb-dataenvironment because with access over odbc i can access the db..
but where's my mistake????
I hope you can help me or give me a hint where and what to look for,