|
-
May 15th, 2008, 07:03 AM
#1
Thread Starter
Hyperactive Member
Connection string error
This code working fine with LOCAL IP not with WAN. can anyone help me abouth this.
Code:
Dim con As New ADODB.Connection
conString = "PROVIDER = SQLOLEDB;SERVER=LOCAL IP;UID=XXXX;PWD=XXXX;DATABASE=TESTDB"
con.ConnectionString = conString
con.Open
DONT RUN EXECUTABLE FILES FROM UNKNOWN SOURCES.

-
May 15th, 2008, 07:10 AM
#2
Re: Connection string error
Of course it won't work with a WAN if you use 'LOCAL IP'. You have to actually use an IP Address...
-
May 15th, 2008, 07:29 AM
#3
Thread Starter
Hyperactive Member
-
May 15th, 2008, 07:32 AM
#4
Re: Connection string error
Well, look at the obvious things first. I hardly think that a SQL database on the WAN or Internet will have a UserName or XXXX or a password of XXXX...
-
May 15th, 2008, 12:09 PM
#5
Re: Connection string error
Thread moved to Database Development forum
Assuming you have changed all the values as apt (ie: replaced LOCAL IP/XXXX/XXXX/TESTDB with whatever is right for your situation), what is the actual problem? (if you are getting an error, what is it?)
-
May 16th, 2008, 05:14 AM
#6
Thread Starter
Hyperactive Member
-
May 16th, 2008, 05:18 AM
#7
Re: Connection string error
That's like attempting to walk thru a brick wall where there is no door. You will get an error...
All your parameters have to be correct for the database you are connecting too.
-
May 17th, 2008, 07:40 AM
#8
Thread Starter
Hyperactive Member
Re: Connection string error
 Originally Posted by randem
That's like attempting to walk thru a brick wall where there is no door. You will get an error...
All your parameters have to be correct for the database you are connecting too.
I can connect thorugh LOCAL IP ie 192.168 series(all my parameter is correct). Is this possible to connect with my STATCI IP i just changed the LOCAL IP to STATIC IP????????????
DONT RUN EXECUTABLE FILES FROM UNKNOWN SOURCES.

-
May 17th, 2008, 01:22 PM
#9
Re: Connection string error
Well, your Local database is not on the WAN, it's on the LAN... You have to use the correct parameters for the database on the WAN.
-
May 18th, 2008, 01:21 AM
#10
Re: Connection string error
 Originally Posted by cutepraba
I can connect thorugh LOCAL IP ie 192.168 series(all my parameter is correct). Is this possible to connect with my STATCI IP i just changed the LOCAL IP to STATIC IP????????????
Are you behind NAT? I believe you need to configure port forwarding when using public IP, otherwise the firewall will block outside request.
-
May 18th, 2008, 05:07 AM
#11
Re: Connection string error
Connect to What???? Doesn't your external database have an IP address or a name that can be resolved to one????
-
May 18th, 2008, 02:30 PM
#12
Re: Connection string error
@randem
he want's to connect using public IP. Maybe he's deploying the application outside the network so he'll use public IP. The problem is if he's behind NAT, then it will not allow incoming traffic.
-
May 18th, 2008, 02:34 PM
#13
Re: Connection string error
That may be so, but the OP hasn't defined exactly what they are doing, where they are running and a host of other thing...
-
May 20th, 2008, 05:10 AM
#14
Re: Connection string error
Exactly. Let's wait for the OP for a detailed info.
-
May 20th, 2008, 08:15 AM
#15
Thread Starter
Hyperactive Member
-
May 20th, 2008, 09:24 AM
#16
Re: Connection string error
-
May 20th, 2008, 02:17 PM
#17
Re: Connection string error
Matter of fact READ all the post since you last posted!!!!
You are not helping us help you at all...
-
May 21st, 2008, 05:29 AM
#18
Thread Starter
Hyperactive Member
-
May 21st, 2008, 05:31 AM
#19
Re: Connection string error
Why don't you answer the posted questions first???
-
May 22nd, 2008, 02:31 AM
#20
Thread Starter
Hyperactive Member
Re: Connection string error
 Originally Posted by randem
Why don't you answer the posted questions first???
Hi, Only I need to learn how to working with STATIC IP, in my concern i am not authorized to using my DB in internet. I just want to learn is there any possible to work. And i am very behind NAT concept and routers etc. but i am sure it did not behind the NAT and configured with inbuilt micorosoft network firewall.
Once again i know only VB6 and SQL 8(installtion, backup, restore some basics). So that i asked for the tutorials. if you dont mind can you give me the tutorials.
DONT RUN EXECUTABLE FILES FROM UNKNOWN SOURCES.

-
May 22nd, 2008, 04:19 AM
#21
Re: Connection string error
Look at the FAQ's in the Database Forum for a start...
-
May 22nd, 2008, 11:03 AM
#22
Re: Connection string error
I don't think they will help much - the closest is for SQL Server 2005, but that uses different tools to SQL Server 2000 (which is not known as 8!). I haven't checked, but some of the advice in it might be useful.
Hi, Only I need to learn how to working with STATIC IP
No you don't - that part is exactly the same as you already had with a local IP.
in my concern i am not authorized to using my DB in internet. ..
This is the problem part, but there are lots of reasons why it might be the case, such as:
- the IP address cannot be mapped to the database server.. so try to Ping that address (if it is successful, this is not the issue).
- there is a firewall which is blocking the ports that SQL Server uses.
- the database engine is set up to not allow remote connections.
- ...
-
May 23rd, 2008, 03:47 AM
#23
Thread Starter
Hyperactive Member
Re: Connection string error
I have a TEST STATIC IP with me now, and the firewall disabled. Ping request OKAY.
vb Code:
Dim con As New ADODB.Connection
Dim conString As String
conString = "PROVIDER = SQLOLEDB;SERVER=XXX.XX.X.XX;UID=XXX;PWD=XXX;DATABASE=XXXX"
con.ConnectionString = conString
con.Open
Set rs = con.Execute("select sname from names where id1 = 148")
MsgBox rs(0)
So the problem is in "the database engine is set up to not allow remote connections." can you please explain how to set this up?
DONT RUN EXECUTABLE FILES FROM UNKNOWN SOURCES.

-
May 23rd, 2008, 11:21 AM
#24
Re: Connection string error
That wasn't the last possibility, just the last one I wrote out (hence the "..." item). 
I don't know off the top of my head how to set it up.. there are instructions for SQL Server 2005 here, but as I said before that is not likely to be very useful - you should try to find a SQL Server 2000 version of the that page.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|