Click to See Complete Forum and Search --> : DSN less connection


venkytvs
February 21st, 2000, 02:41 AM
Hi all

Is to possible to have a connection without specifying the DSN(ODBC).

TH1
February 21st, 2000, 03:12 AM
Yes use OLEDB

dim cnn as ADODB.connection
set cnn=new ADODB.connection
with cnn
.provider="SQLOLEDB"
.CursorLocation = adUseServer
.ConnectionTimeout = 0
.ConnectionString="SERVER=whatever;uid=whatever;pwd=whatever" & _
";INITIAL CATALOG=whateverdatabase"
.open
end with



SERVER is the server that your database is on
INITIAL CATALOG is the database you want to connect to
This is what I use for SQL SERVER the only thing that I don't like is that I now have to use ini files to change servers and databases

venkytvs
February 21st, 2000, 03:31 AM
I am using Paradox3.0 database. Where can I get OLEDB provider for Paradox.


Thanks
Venky

TH1
February 21st, 2000, 05:53 AM
I'm sorry but I haven't a clue
Try wherever you got your ODBC drivers from or search the net.