473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

odbc connect string and library list

I am trying to write an app in vfp 8.0 using cursoradapters connecting
to an as400 db2 database. My goal is to set up a test data library
(called FRED) on the iseries identical to the production data library
and manipulate the library list the pc uses by changing the odbc
connection string. If my understanding is correct, the DBQ option of
the connection string adds libraries to the lib list, but I can't get
the cursor to load unless I qualify the table name with the library
name.

I also can not find any good documentation on IBM Access for Windows
ODBC properties but have found this one for LINUX(which is what I'm
going by).
http://www-03.ibm.com/servers/eserve...roperties.html

Thanks in advance.
Here's my code:

lcConnStr= "DRIVER={iSeries Access ODBC Driver};" ; +
"PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;" ;
+ "LANGUAGEID=ENU;" ;
+ "DFTPKGLIB=QGPL;" ;
+ "XDYNAMIC=1;" ;
+ "DBQ=QGPL,FRED;" ;
+ "SYSTEM=SCCA400;" ;
+ "Trusted Connection=Yes;"

retval = SQLSTRINGCONNECT(lcConnStr)

<This doesn't work>
select PERCENT, NAME, ADDRESS1, TAXID, CHECKCODE, HOLDFUND, LLORDSWT,
REBATEAMT, ADDRESS2, CITY, STATE, ZIP, ZIPEXT, UPDSWT, CROPYR,
CONTRACT, SUB, IDNO from CPARTNERS

<This works>
select PERCENT, NAME, ADDRESS1, TAXID, CHECKCODE, HOLDFUND, LLORDSWT,
REBATEAMT, ADDRESS2, CITY, STATE, ZIP, ZIPEXT, UPDSWT, CROPYR,
CONTRACT, SUB, IDNO from FRED.CPARTNERS

Mar 23 '06 #1
2 5712
In article <11*********************@g10g2000cwb.googlegroups. com>,
fr**********@yahoo.com says...
+ "DBQ=QGPL,FRED;" ;
+ "SYSTEM=SCCA400;" ;
+ "Trusted Connection=Yes;"


The docs say:
Note, the first library listed in this property will also be the default
library, which is used to resolve unqualified names in SQL statements.
To specify no default library, a comma should be entered before any
libraries.

So I guess you need to change the DBQ option to 'DBQ=FRED,QGPL;'
Mar 23 '06 #2
Thanks, that solved the problem.

Mar 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Remco Groot Beumer | last post by:
Hello all, Currently we are implementing an Access database which has to send some (not much) data over a WAN. We are using an Access front end and an Access back end. Basicly the front end runs...
5
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
2
by: kai | last post by:
Hi, All I used to link a SQL Server 2000 table through ODBC in Access 2003 using Wizard, now because the security requirement, I want to do the same job using code. I tried hard, but not...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.