 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bo Guest
|
Posted: Wed Aug 11, 2004 5:10 am Post subject: Remote database connection |
|
|
Hi guys,
It probably sounds silly but I have spent too much time to figure out how to
connect to remote SQL server database. I have been digging for days the SQL
and Delphi help and I found nothing, which may help me. It is probably so
easy that it is not necessary to be in a help file . ??
The SQL server I intend to connect is set to "Allow other SQL Servers to
connect remotely .". I have the IP address of the server and I create
successful ODBC connection using that IP address while I'm in the same local
network. But any intend to do the same remotely fails. My goal is to connect
application (app. uses ODBC) from one office to the central office via
Internet.
Please, I will appreciate any guideline or resource where I can read about
!!
Thank you
|
|
| Back to top |
|
 |
Michael Qua Guest
|
Posted: Wed Aug 11, 2004 6:35 am Post subject: Re: Remote database connection |
|
|
Bo wrote:
| Quote: | Hi guys,
It probably sounds silly but I have spent too much time to figure out how to
connect to remote SQL server database. I have been digging for days the SQL
and Delphi help and I found nothing, which may help me. It is probably so
easy that it is not necessary to be in a help file . ??
The SQL server I intend to connect is set to "Allow other SQL Servers to
connect remotely .". I have the IP address of the server and I create
successful ODBC connection using that IP address while I'm in the same local
network. But any intend to do the same remotely fails. My goal is to connect
application (app. uses ODBC) from one office to the central office via
Internet.
Please, I will appreciate any guideline or resource where I can read about
!!
Thank you
If you have VPN setup, the remote server would appear to be on the local |
network.
|
|
| Back to top |
|
 |
Bo Guest
|
Posted: Wed Aug 11, 2004 7:28 pm Post subject: Re: Remote database connection |
|
|
No Mike, I dont have VPN and I dont even know what it is.
I'm also not a system administrator and I' not a web developer
"Michael Qua" <michaelsyqua (AT) yahoo (DOT) com> wrote
| Quote: | Bo wrote:
Hi guys,
It probably sounds silly but I have spent too much time to figure out
how to
connect to remote SQL server database. I have been digging for days the
SQL
and Delphi help and I found nothing, which may help me. It is probably
so
easy that it is not necessary to be in a help file . ??
The SQL server I intend to connect is set to "Allow other SQL Servers to
connect remotely .". I have the IP address of the server and I create
successful ODBC connection using that IP address while I'm in the same
local
network. But any intend to do the same remotely fails. My goal is to
connect
application (app. uses ODBC) from one office to the central office via
Internet.
Please, I will appreciate any guideline or resource where I can read
about
!!
Thank you
If you have VPN setup, the remote server would appear to be on the local
network.
|
|
|
| Back to top |
|
 |
Dennis Passmore Guest
|
Posted: Thu Aug 12, 2004 1:09 pm Post subject: Re: Remote database connection |
|
|
There are several ways to do this so what I am describing is just my way:
Open the Control Panel/Administrative Tools/Data Sources(ODBC). Now "Add" a User DSN,
during the setup of the User DSN is where you need to enter the Remote Server ( Name or IP
), the default database name that you want to connect to and the UserID/Password to be
used to test the connection.
Once you have this working you can go back into the Delphi IDE and setup a TADOConnection
or TDatabase ( BDE ). In the object inspector for the TADOConnection click on
ConnectionString and then the Build button. Now select the data access type of "Microsoft
OLE DB provider for Sql Server" then click Next. In the Connection dialog enter the Sql
server name ( or IP address ), login UserID/Password, and database name to connect to.
Click OK until you are back to the main edit window. Your Connection object should be
ready to use by connection it to some data aware component. All you have to do is set its
Connected property to True at runtime and it should connect and provide a means of
executing a query to the Sql server to retrieve data.
All of the "hard coded" parameters you entered during the initial setup of the ODBC User
DSN and the Delphi TADOConnection can be overriden at runtime ( and usually are ) so they
can be reconfigured to match the individual UserID/Password/Database requirements.
Dennis Passmore
Ultimate Software, Inc.
|
|
| Back to top |
|
 |
Bo Guest
|
Posted: Fri Aug 13, 2004 2:14 pm Post subject: Re: Remote database connection |
|
|
Dennis,
I certainly thank you for your good will to help me.
Before my posting, I have already tried to do the same using "System DSN"
instead.
Now I tried with User DSN but still the same problem.
Connection failed:
SQLState: '01000'
SQL Server Error: 10060
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionOpen(Connect()).
Connection failed:
SQLState:'08001'
......SQL Server does not exist or access denied.
I wish to make clear - the application uses ODBC, therefore ADO solution is
not applicable.
Maybe you can guess what mistake I do if you know that I manage to create
the above ODBC DSN using the IP address while I'm at the LAN of the Main
location, but it fails when I try from the Remote one.
Both servers are set to "Allow other SQL Servers to connect remotely .."
----- Original Message -----
From: <Dennis Passmore>
Newsgroups: borland.public.delphi.database.sqlservers
Sent: Thursday, August 12, 2004 9:09 AM
| Quote: | There are several ways to do this so what I am describing is just my
way:
Open the Control Panel/Administrative Tools/Data Sources(ODBC). Now
"Add" a User DSN,
during the setup of the User DSN is where you need to enter the
Remote Server ( Name or IP
), the default database name that you want to connect to and the
UserID/Password to be
used to test the connection.
........................................
Dennis Passmore
Ultimate Software, Inc.
|
|
|
| Back to top |
|
 |
Igor Gottwald Guest
|
Posted: Sat Aug 14, 2004 12:38 pm Post subject: Re: Remote database connection |
|
|
Check if you can ping the server. Is any firewall on the way? Check firewall
rules carefully or try to disable it during the test.
Igor Gottwald
"Bo" <boyan_ch (AT) yahoo (DOT) com> píše v diskusním příspěvku
news:4119aa23 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi guys,
It probably sounds silly but I have spent too much time to figure out how
to
connect to remote SQL server database. I have been digging for days the
SQL
and Delphi help and I found nothing, which may help me. It is probably so
easy that it is not necessary to be in a help file . ??
The SQL server I intend to connect is set to "Allow other SQL Servers to
connect remotely .". I have the IP address of the server and I create
successful ODBC connection using that IP address while I'm in the same
local
network. But any intend to do the same remotely fails. My goal is to
connect
application (app. uses ODBC) from one office to the central office via
Internet.
Please, I will appreciate any guideline or resource where I can read about
!!
Thank you
|
|
|
| Back to top |
|
 |
Bo Guest
|
Posted: Sat Aug 14, 2004 9:35 pm Post subject: Re: Remote database connection |
|
|
Hi Igor,
Yes, we have firewall. Unfortunately I have 0 knowledge about it but I'm
certain the problem is not there because some otter developers use to access
the main database for different reasons in the past. I did not participate
in these projects and I have not communication with these guys.
No, I cannot ping the server and I realize the problem must be that. I
mainly test from home using 56k dialup since the other location is 100's of
miles away.
Please note that both SQL installations are using the "Personal" edition of
SQL2000. Reading the publications I have the feeling that I must have a
"dedicated SQL Server" machine with assigned IP address. I doubt do we have
and did we ever had such a configuration and I repeat - we had people using
different databases on different machines remotely.
I know that I try to swim in the waters of a System or DB Admin but I have
no other solution.
"Igor Gottwald" <gottwald (AT) oksoftware (DOT) cz> wrote
| Quote: | Check if you can ping the server. Is any firewall on the way? Check
firewall
rules carefully or try to disable it during the test.
Igor Gottwald
"Bo" <boyan_ch (AT) yahoo (DOT) com> píše v diskusním příspěvku
news:4119aa23 (AT) newsgroups (DOT) borland.com...
Hi guys,
It probably sounds silly but I have spent too much time to figure out
how
to
connect to remote SQL server database. I have been digging for days the
SQL
and Delphi help and I found nothing, which may help me. It is probably
so
easy that it is not necessary to be in a help file . ??
The SQL server I intend to connect is set to "Allow other SQL Servers to
connect remotely .". I have the IP address of the server and I create
successful ODBC connection using that IP address while I'm in the same
local
network. But any intend to do the same remotely fails. My goal is to
connect
application (app. uses ODBC) from one office to the central office via
Internet.
Please, I will appreciate any guideline or resource where I can read
about
!!
Thank you
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|