muldeyur
asked on
Connecting to a remote SQL DB
Hi,
I need to connect to a remote SQLserver outside my local network. The Server is on the Internet. i played arround with the Midware Package but didn't succeed.
I'am looking for some pointers or idea's to create the connection, it has to be very stable and secure.
Hope somebody has done this before and is willing to help.
Regards,
Yuri
I need to connect to a remote SQLserver outside my local network. The Server is on the Internet. i played arround with the Midware Package but didn't succeed.
I'am looking for some pointers or idea's to create the connection, it has to be very stable and secure.
Hope somebody has done this before and is willing to help.
Regards,
Yuri
ASKER
Thankx ManjusHan,
Do you have a Code example?
I alway's worked with Odbc.
Cheers,
Yuri
Do you have a Code example?
I alway's worked with Odbc.
Cheers,
Yuri
ADO-Active data objects also use ODBC.If ur using Delphi 5 u will have ADO components. ADO Connection is availabe through which u can build ur connection string. If ur using > Delphi 5.Then use ADODB_TLB. U have a _connection class.
Set the connection string something like this
ConnectionString := 'mydatabase'
Connection.Open(Connection String,use rname,pass word)
for SQLServer it will look like his
Connectionstring := 'Provider=MSDASQL.1;Persis t Security Info=False;User ID=sa;Data Source=mydata'
U have a connection.Then use _RecordSet to open tables.For detailed info search for ADO in any Delphi site.
Good luck.
Manju.
Set the connection string something like this
ConnectionString := 'mydatabase'
Connection.Open(Connection
for SQLServer it will look like his
Connectionstring := 'Provider=MSDASQL.1;Persis
U have a connection.Then use _RecordSet to open tables.For detailed info search for ADO in any Delphi site.
Good luck.
Manju.
ASKER
Thankx, i'am using delphi4,
but i can usethe Ado typlib. Would it be possible to set up a dsn to a remote sql server?
but i can usethe Ado typlib. Would it be possible to set up a dsn to a remote sql server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sure u can connect to a remote server using Ado typ lib.
User connection string will look like this
ConnectionString := "Provider=MSDASQL.1;Persis t Security Info=False;User ID=sa;Data Source=MyDatabase;SERVER=1 64.164.64. 25;UID=sa; WSID=MANJU ;DATABASE= ProductCen ter;Addres s=164.164. 64.25,1433 "
Systemname - MANJU
DatabaseName - ProductCenter
Alias/Source - MyDatabase
Addressofthe remote machine-164.164.64.25
Port-1443
Good luck
Manju
User connection string will look like this
ConnectionString := "Provider=MSDASQL.1;Persis
Systemname - MANJU
DatabaseName - ProductCenter
Alias/Source - MyDatabase
Addressofthe remote machine-164.164.64.25
Port-1443
Good luck
Manju
Good luck.
Manju.