Several Databases with sql server

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
Jorge Aguilar

Several Databases with sql server

Post by Jorge Aguilar » 10 Jan 2007, 19:50

 Posted by:  Jorge Aguilar Burga 

Hi everybody, i need to deploy a application dialog box or form window to
select Server Name, database, user and password, after i select the
diferents options in this application, i connect to a database, the databses
are the same, but depends the time i need choose teh connection.
has any idea.
I think to read some DSN from odbc, but not all can send me a example.

Regards.
Jorge

Jonas Mandahl Pedersen

Several Databases with sql server

Post by Jonas Mandahl Pedersen » 15 Jan 2007, 09:51

 Posted by:  Jonas Pedersen 

I am not sure I understand your question 100%.

If you use the MS ODBC driver you could configure your Sql.ini like this:

[odbcrtr]
remotedbname=afternoon,DRIVER={SQL
Server};UID=SA;DATABASE=mydb;SERVER=zuluserver1;AnsiNPW=No;QuotedId=No;
remotedbname=evening,DRIVER={SQL
Server};DATABASE=mydb;SERVER=zuluserver2;AnsiNPW=No;QuotedId=No;
remotedbname=morning,DRIVER={SQL
Server};DATABASE=mydb;SERVER=zuluserver3;AnsiNPW=No;QuotedId=No;

Please note the remotedb name is just the alias for the database, so you can
call that what ever you like.

From TD you only use the alias when connecting.

Was that of any help?

Jonas

michael
Germany
Posts: 300
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

Several Databases with sql server

Post by michael » 17 Jan 2007, 11:59

 Posted by:  Michael Hummel 

we do same things in some projects.
but we use OLEDB Connections, means UDL Files.
no odbc, no dsn, no sql.ini,
runs with TD 4.1 and later

create several UDL Files in your application folder
make a dialog, where you can choose an udl File
set SQLUDL = dfSelectedUDL
call SqlConnect(...)

micha

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests