Tuesday, March 27, 2012

connecting to SQL Server 2000 from a VB.net app using ADO.net

Hi
I can connect from my app to sql server on the local lan, but I can't connect over the
Internet. I can't create a remote connection in Enterprise Manager. However, I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;Database=* *****;Network Address=******
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan as the
SQL Server machine. However, whenever I try to connect across the Internet (from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over the LAN
but not over the Internet? I suspect some networking thing, like a firewall on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-client
interfaces implemented in front of them. I have never tried to do this from a Windows
fat-client, and I suspect very poor performance and excess resource utilization on
the server
Any help or article will be appriciated
In terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:

>Hi
>I can connect from my app to sql server on the local lan, but I can't connect over the
>Internet. I can't create a remote connection in Enterprise Manager. However, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
>ID=******;Password=******;Server=******;Database= ******;Network Address=******
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan as the
>SQL Server machine. However, whenever I try to connect across the Internet (from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over the LAN
>but not over the Internet? I suspect some networking thing, like a firewall on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-client
>interfaces implemented in front of them. I have never tried to do this from a Windows
>fat-client, and I suspect very poor performance and excess resource utilization on
>the server
>Any help or article will be appriciated
sqlsql

connecting to SQL Server 2000 from a VB.net app using ADO.net

Hi
I can connect from my app to sql server on the local lan, but I can't connec
t over the
Internet. I can't create a remote connection in Enterprise Manager. However,
I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;
Database=******;Network Address=****
**
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan a
s the
SQL Server machine. However, whenever I try to connect across the Internet (
from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over t
he LAN
but not over the Internet? I suspect some networking thing, like a firewall
on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-clie
nt
interfaces implemented in front of them. I have never tried to do this from
a Windows
fat-client, and I suspect very poor performance and excess resource utilizat
ion on
the server
Any help or article will be appriciatedIn terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:

>Hi
>I can connect from my app to sql server on the local lan, but I can't conne
ct over the
>Internet. I can't create a remote connection in Enterprise Manager. However
, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
> ID=******;Password=******;Server=******;
Database=******;Network Address=***
***
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan
as the
>SQL Server machine. However, whenever I try to connect across the Internet
(from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over
the LAN
>but not over the Internet? I suspect some networking thing, like a firewall
on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-cli
ent
>interfaces implemented in front of them. I have never tried to do this from
a Windows
>fat-client, and I suspect very poor performance and excess resource utiliza
tion on
>the server
>Any help or article will be appriciated

Connecting to SQL Server 2000 from a VB 6.0 app using ADO

How to connect to real ip such as 202.28.94.10 from DCHP ip by use VB 6 .. I don't know about to use connection string ...
My PC is insatalled My SQL Server2000 and has ip 10.98.10.97 that is DHCP ip and another ones is installed the same but that it real ip. Both PC can't to see them together in network

This problem make my first PC can't access database to another one.
Help me plssss...I'm not entirely certain I understood your question. It appears that your SQL server is a DHCP client (and thus it is possible that the IP address will periodically change due to a reboot or a lease renewal (should not happen often, but it is possible).

Is it not possible to connect to the server via its name instead of the IP? Ie, use the DNS server to resolve the IP address?

On the other hand, re-reading your question seems to indicate that you have 2 client workstations, one DHCP and one static. It appears that the static IP client can connect to SQL and the DHCP client cannot. If that is the case, then you appear to have a network issue unrelated to SQL and you must work with the network admin to ensure that connectivity is not being blocked by routing rules.

If I have misunderstood your question, please forgive me.

Sorry, I guess I need a bit more info to help.

Regards,

Hugh Scott

Originally posted by cs423326
How to connect to real ip such as 202.28.94.10 from DCHP ip by use VB 6 .. I don't know about to use connection string ...
My PC is insatalled My SQL Server2000 and has ip 10.98.10.97 that is DHCP ip and another ones is installed the same but that it real ip. Both PC can't to see them together in network

This problem make my first PC can't access database to another one.
Help me plssss...|||Hi hmscott .
What is connection string in VB
My connection string to DHCP ip is "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=G7;Data Source=NUT"

when I will change Data Source from NUT to 10.98.10.97 (This is My DHCP Client IP) it work...
But when i change to Static ip (202.xxx.xxx.xxx) it does not work
How will i do??Please tell me about connection string that can be access to SQL Server..
thx|||Some things to test:

1. Can you Ping the static IP from your workstation (Ping 202.xxx.xxx.xxx).

If not, you need to see your network admin.

2. If you have query analyzer on your client, can you log in to the static IP server?

Again, iff not, you need to see your network admin.

HTH, my understanding gets much fuzzier once you get down to the network layer...

Regards,

Hugh Scott

Originally posted by cs423326
Hi hmscott .
What is connection string in VB
My connection string to DHCP ip is "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=G7;Data Source=NUT"

when I will change Data Source from NUT to 10.98.10.97 (This is My DHCP Client IP) it work...
But when i change to Static ip (202.xxx.xxx.xxx) it does not work
How will i do??Please tell me about connection string that can be access to SQL Server..
thx|||Hi again hmscott.
I ping the static ip from my PC is work..
and I can't use query analyzer log in to static ip server

..my PC (installed SQL Server 2000) and the static ip PC (installed the same) not in the same network ...then Both of them can't connect through SQL Tools.

How can I solve this problem??
and How can I code to connect them with VB?

Please help me again...
Thx.|||Perhaps it would help if you posted the actual error message text. I suggest that you try to set up a registration for the other machine in SQL Enterprise Manager and then copy the text of the error message and post it here|||thx MealinA

This is error message when I tried to Register with SQL Enterprise Manager:

xxx.xxx.xxx.xxx-Login fail for user 'userName'.Reason :Not Associated with a trusted SQL Server Connection;

and

and this is error message when i tried to create DSN :

Connection failed:
SQL State:'28000'
SQL Server Error:18452
[Microsoft][ODBC SQL Server Driver][SQL Server]Login fail for user 'user'.Reason :Not Associated with a trusted SQL Server Connection.

Help me plsss...|||See if you can connect with this connection string:

"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=<sa password>;Initial Catalog=G7;Data Source=<ip address>"

If this connects OK then your problem is authentication. I can give you some advice if that is the case...|||Hi MealinA.
I tried to connect my SQL Server with a connection string :
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=<sa password>;Initial Catalog=G7;Data Source=<ip address>"

but is not work ...
Error :

Runtime error 'xxxxx'
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.

How can I solve that??|||did you replace <sa password> with the sa password for your server and <ip address> with the ip address for your server in the connection string before trying it?|||Yes I do,MealinA.
But It does not work..
and if I tried to connect with my user(created) it show the same result..|||On the server if you go (start->run) svrnetcn.exe and make sure only TCP/IP is listed under enabled protocols. Click on TCP/IP then Properties. The default port should be 1433 and the hide server box should be unchecked.

Also in SQL-EM on the server choose the local machine and then go (Tools->SQL Server Configuration Properties). Go to the Security tab and check that Authentication is set to SQL Server and Windows.

On the client go (start->run) cliconfg.exe and make sure that TCP/IP is the only (or at least the first) protocol listed. Click on TCP/IP then Properties. The default port should be 1433.

Tip: (This assumes you have MDAC 2.6 or higher on your CLIENT pc) Something I do is to use the Alias tab to set and alias for the server. Click Add, then enter MySQLServer in the Server alias box. Choose TCP/IP in the Network Libraries list. Under Connection parameters set Server name to <your server ip address> and check Dynamically determine port. Then use MySQLServer in the connection string. This means if the server ip address changes you can run cliconfg and change the alias without needing to change the connectiion string.

If this is all set up then there is no reason why the client should not connect to the server from SQL Server's perspective. If it still will not connect then I would suggest you carefully analyse your network configuration on the computers involved.

connecting to SQL Server 2000

hi all;
I have a SQL server ent. edition installed on windows 2003, I want to
register another SQL server instance installed on windows xp, in my
enterprise manager. When I try to do that i get the following error message.
"SQL server does not exists or access denied."
note that no domain controller is installed on the network.
What is reason, and how can i resolve it?
all ideas would be highly appreciated...
AnsariYou have to verify that :
1. you have nioo network problems , you can test sharing a folder on the XP
machine and access this share from Win2003
2. Verifiy that you have no accounts problems and permissions
3.verify thant services are really started on the xp machine
4. try to register xp server from Win2003 using the IP adresss first second
try with the netbios name .
5. activate the mixed security on the xp machine and try to register with SA
login .
I think that with these 5 tests you should fix the poblem
hch
"Ansari" a écrit :

> hi all;
> I have a SQL server ent. edition installed on windows 2003, I want to
> register another SQL server instance installed on windows xp, in my
> enterprise manager. When I try to do that i get the following error messag
e.
> "SQL server does not exists or access denied."
> note that no domain controller is installed on the network.
> What is reason, and how can i resolve it?
> all ideas would be highly appreciated...
> Ansari
>
>

connecting to SQL Server 2000

hi all;
I have a SQL server ent. edition installed on windows 2003, I want to
register another SQL server instance installed on windows xp, in my
enterprise manager. When I try to do that i get the following error message.
"SQL server does not exists or access denied."
note that no domain controller is installed on the network.
What is reason, and how can i resolve it?
all ideas would be highly appreciated...
Ansari
You have to verify that :
1. you have nioo network problems , you can test sharing a folder on the XP
machine and access this share from Win2003
2. Verifiy that you have no accounts problems and permissions
3.verify thant services are really started on the xp machine
4. try to register xp server from Win2003 using the IP adresss first second
try with the netbios name .
5. activate the mixed security on the xp machine and try to register with SA
login .
I think that with these 5 tests you should fix the poblem
hch
"Ansari" a écrit :

> hi all;
> I have a SQL server ent. edition installed on windows 2003, I want to
> register another SQL server instance installed on windows xp, in my
> enterprise manager. When I try to do that i get the following error message.
> "SQL server does not exists or access denied."
> note that no domain controller is installed on the network.
> What is reason, and how can i resolve it?
> all ideas would be highly appreciated...
> Ansari
>
>
sqlsql

connecting to SQL Server 2000

hi all;
I have a SQL server ent. edition installed on windows 2003, I want to
register another SQL server instance installed on windows xp, in my
enterprise manager. When I try to do that i get the following error message.
"SQL server does not exists or access denied."
note that no domain controller is installed on the network.
What is reason, and how can i resolve it?
all ideas would be highly appreciated...
AnsariYou have to verify that :
1. you have nioo network problems , you can test sharing a folder on the XP
machine and access this share from Win2003
2. Verifiy that you have no accounts problems and permissions
3.verify thant services are really started on the xp machine
4. try to register xp server from Win2003 using the IP adresss first second
try with the netbios name .
5. activate the mixed security on the xp machine and try to register with SA
login .
I think that with these 5 tests you should fix the poblem
hch
"Ansari" a écrit :
> hi all;
> I have a SQL server ent. edition installed on windows 2003, I want to
> register another SQL server instance installed on windows xp, in my
> enterprise manager. When I try to do that i get the following error message.
> "SQL server does not exists or access denied."
> note that no domain controller is installed on the network.
> What is reason, and how can i resolve it?
> all ideas would be highly appreciated...
> Ansari
>
>

Connecting to SQL Server 2000

Hi,

I am total newbie to SQL Server. My new host tells me I can connect through
AccessXP or 2002. I have Access 2000. Can I not connect with that also?

Thanks, JAJA wrote:
> Hi,
> I am total newbie to SQL Server. My new host tells me I can connect
> through AccessXP or 2002. I have Access 2000. Can I not connect with
> that also?
> Thanks, JA

Yep, also Access 97, 95, and Access 2.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com|||Rick,

I didn't word that right. Does your answer mean Yes I can, or Yes I can't?

:-)

"Rick Brandt" <rickbrandt2@.hotmail.com> wrote in message
news:346h7iF45hj8fU1@.individual.net...
> JA wrote:
>> Hi,
>>
>> I am total newbie to SQL Server. My new host tells me I can connect
>> through AccessXP or 2002. I have Access 2000. Can I not connect with
>> that also?
>>
>> Thanks, JA
> Yep, also Access 97, 95, and Access 2.
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com|||There are some compatibility problems with ADP-s (Access Data
Project-s) in Access 2000 connecting to a SQL Server 2000. There are no
problems, however if you use MDB-s. Access 2000 ADP-s work best with
SQL Server 7. To use the latest features of SQL Server 2000 you need to
connect with Access XP (2002). For more informations, see:
http://support.microsoft.com/kb/269824

Razvan|||JA wrote:
> Rick,
> I didn't word that right. Does your answer mean Yes I can, or Yes I
> can't?

If you want to you use an Access Data Project then this is available from Access
2000 and up. If you use an MDB with ODBC than you can use any version you want.
All you need is the correct ODBC driver.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com