I have an application written in VB.NET that connects directly to a
SQL Server 2000 database over the internet. It works fine on the
development machine (XP Pro), as well as two outside machines running
XP Pro. It does NOT work on two other outside machines, both running
Win2000. All 4 outside machines have the latest .NET framework
installed. I assume that XP has something by default that the 2000
machines do not, but I have no idea what that something could be that
would affect my software. I tried installing MDAC 2.8 as well as the
"sqlredist. exe" on both 2000 machines, but no dice. Is there anything
else I need to install, which XP just happens to already include? The
code doesn't appear to be the issue, since it works on the two XP
machines. And permissions and/or firewalls don't appear to be an
issue for the same reason. Here is the code in question, if that
helps:
Public conTemp As SqlClient.SqlCo nnection
conTemp = New SqlClient.SqlCo nnection("Data
Source=xxx.xxx. xxx.xxx\servern ame;Network Library=DBMSSOC N;Initial
Catalog=somenam e;User ID=username;Pas sword=password; ")
conTemp.Open() 'this is the line where the error occurs
The actual error is "Object reference not set to an instance of an
object", as though the second line above was absent (I get the same
error if I comment out the second line of code and run it on the
development machine). I thought that maybe certain SQL Server drivers
were needed in order for the SQLConnection to operate correctly, but I
assume the MDAC and "sqlredist. exe" would have taken care of that if
it was the problem. I'm out of ideas and appreciate any you guys
might have.
Andrew
SQL Server 2000 database over the internet. It works fine on the
development machine (XP Pro), as well as two outside machines running
XP Pro. It does NOT work on two other outside machines, both running
Win2000. All 4 outside machines have the latest .NET framework
installed. I assume that XP has something by default that the 2000
machines do not, but I have no idea what that something could be that
would affect my software. I tried installing MDAC 2.8 as well as the
"sqlredist. exe" on both 2000 machines, but no dice. Is there anything
else I need to install, which XP just happens to already include? The
code doesn't appear to be the issue, since it works on the two XP
machines. And permissions and/or firewalls don't appear to be an
issue for the same reason. Here is the code in question, if that
helps:
Public conTemp As SqlClient.SqlCo nnection
conTemp = New SqlClient.SqlCo nnection("Data
Source=xxx.xxx. xxx.xxx\servern ame;Network Library=DBMSSOC N;Initial
Catalog=somenam e;User ID=username;Pas sword=password; ")
conTemp.Open() 'this is the line where the error occurs
The actual error is "Object reference not set to an instance of an
object", as though the second line above was absent (I get the same
error if I comment out the second line of code and run it on the
development machine). I thought that maybe certain SQL Server drivers
were needed in order for the SQLConnection to operate correctly, but I
assume the MDAC and "sqlredist. exe" would have taken care of that if
it was the problem. I'm out of ideas and appreciate any you guys
might have.
Andrew
Comment