Board index » delphi » Programmatic Database connections without BDE or DSN aliases

Programmatic Database connections without BDE or DSN aliases

Is it possible to use the tdatabase.params.values as the only congiguration
for logging onto to a database - ie not using either a system DSN or BDE
alias?

Im using the tdatabase, tquery and tprovider components to produce a COM
database connection object. Im tying the tquery object to the tdatabase object
by using the same databasename.

At current, I cna make it work if i use a system DSN (defined in the odbc
settings) or a bde alias but i cant get it to work just by supplying the
server, database name and driver name.

Anyone know of a solution to this?

Thanks in advance, Rhys.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

 

Re:Programmatic Database connections without BDE or DSN aliases


rhys.jo...@gb.swissbank.com wrote in article
<6de5q1$4r...@nnrp1.dejanews.com>...

Quote
> Is it possible to use the tdatabase.params.values as the only
congiguration
> for logging onto to a database - ie not using either a system DSN or BDE
> alias?

Yes, it is possible -- at least for some configurations.  We have done
this with SqlServer using the native driver and our parameters looked
something like this:

SERVER NAME=MyServer
DATABASE NAME=MyDatabase

You might make sure that the parameters are spelled and cased correctly.
It seems to just silently ignore invalid parameters.

Hope this helps,
William
--
William Tucker
Compu-Share, Inc.

WTuc...@Compu-Share.com
William.Tuc...@worldnet.att.net

Other Threads