External Database dsn

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

External Database dsn

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:21 pm

by ssi >> Mon, 17 Feb 2003 2:36:50 GMT

Hi, i am trying to change the file dsn of an external database in Jade using code. After changing the dsn of the database using the setFileDSN method, i try doing a doing a getAtKey on an external Dictionary based off that database, but it somehow still thinks it is looking in the old location for the file dsn, as i get an odbc error message saying that the path is invalid.

The code I am using :

vars
exap : QMAppSth; //External DataBase
apCol : QMCrs_appellationByPDict; //External Dictionary
ap : QMCrs_appellation; //External Objectbegin


create apCol transient;
exap := apCol.database.QMAppSth;
write exap.getFileDSN;
exap.setFileDSN('D:\Program Files\QMap\QMAppSth.dsn');
//exap.inspectModal;
exap.close;
write exap.getFileDSN;
ap := apCol.getAtKey(3555397);
ap.inspectModal;

end;

Has anyone had experience with this?

cheers
Mark

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: External Database dsn

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:21 pm

by michaelj >> Mon, 31 Mar 2003 11:20:05 GMT

Mark,
A while back I had a problem with the stored DSN being included in generated queries. This meant that changing the DSN in code allowed the app to successfully connect but when performing any operations the stored dsn was used, resulting in an ODBC exception. I thought this problem was limited to Access but you could try the following;

Edit your ini file as follows:

[ExternalDb]
SuppressCatalogNameUsage=true

You must then use the wizard, reconnect to the data source and regenerate the queries (check that path is not included in class queries)

Michael J.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 34 guests