By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,616 Members | 2,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,616 IT Pros & Developers. It's quick & easy.

SqlClient remote connection problems

P: n/a
I have a SQL Server database on a Windows 2000 Server. I have IIS running
on a 2nd 2000 Server with no SQL Server on it.. Neither are the PDC. Both
servers have the most recent .NET framework installed.

When I try to connect from my aspx page using SqlClient I get an error right
away. My code looks something like...

Imports System.Data.SqlClient

Dim Conn2 As New SqlClient.SqlConnection("Data
Source=10.10.10.101,1433;Initial Catalog=MapLayers; UID=coresqluser;
PWD=OeQu_!102")
Dim cmd As SqlClient.SqlCommand
Dim objDataReader As SqlClient.SqlDataReader
Dim strSQL As String
Dim basename As String
Dim appt As String
Dim last_upd As String
Dim n As Integer

appt = Request.QueryString("atype")
basename = Request.QueryString("thebase")

Conn2.Open()

strSQL = "SELECT * from site_name WHERE site_name.site_id = '" & basename &
"';"
cmd = New SqlClient.SqlCommand(strSQL, Conn2)
objDataReader = cmd.ExecuteReader
It errors on the "Imports" line....If I remove it, I get am error on the
first DIM. It seems the problem is with the SqlClient class. If I put .NET
framework on a machine without SQL Server, are these connectors installed?

Any ideas or suggestions would be appreciated,

Tony Zoccolillo
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This line should read...

Source=10.10.10.101,1433;Initial Catalog=MapLayers; User ID=coresqluser;
Password=OeQu_!102")


"Tony Zoccolillo" <to*****@hotmail.com> wrote in message
news:uN******************@tk2msftngp13.phx.gbl...
I have a SQL Server database on a Windows 2000 Server. I have IIS running
on a 2nd 2000 Server with no SQL Server on it.. Neither are the PDC. Both servers have the most recent .NET framework installed.

When I try to connect from my aspx page using SqlClient I get an error right away. My code looks something like...

Imports System.Data.SqlClient

Dim Conn2 As New SqlClient.SqlConnection("Data
Source=10.10.10.101,1433;Initial Catalog=MapLayers; UID=coresqluser;
PWD=OeQu_!102")
Dim cmd As SqlClient.SqlCommand
Dim objDataReader As SqlClient.SqlDataReader
Dim strSQL As String
Dim basename As String
Dim appt As String
Dim last_upd As String
Dim n As Integer

appt = Request.QueryString("atype")
basename = Request.QueryString("thebase")

Conn2.Open()

strSQL = "SELECT * from site_name WHERE site_name.site_id = '" & basename & "';"
cmd = New SqlClient.SqlCommand(strSQL, Conn2)
objDataReader = cmd.ExecuteReader
It errors on the "Imports" line....If I remove it, I get am error on the
first DIM. It seems the problem is with the SqlClient class. If I put ..NET framework on a machine without SQL Server, are these connectors installed?

Any ideas or suggestions would be appreciated,

Tony Zoccolillo

Nov 18 '05 #2

P: n/a
Have you set a reference to the .dll? If so, perhaps you should set it to
make a local copy, as a workaround.

"Tony Zoccolillo" <to*****@hotmail.com> wrote in message
news:Ob****************@TK2MSFTNGP11.phx.gbl...
This line should read...

Source=10.10.10.101,1433;Initial Catalog=MapLayers; User ID=coresqluser;
Password=OeQu_!102")


"Tony Zoccolillo" <to*****@hotmail.com> wrote in message
news:uN******************@tk2msftngp13.phx.gbl...
I have a SQL Server database on a Windows 2000 Server. I have IIS running on a 2nd 2000 Server with no SQL Server on it.. Neither are the PDC. Both
servers have the most recent .NET framework installed.

When I try to connect from my aspx page using SqlClient I get an error

right
away. My code looks something like...

Imports System.Data.SqlClient

Dim Conn2 As New SqlClient.SqlConnection("Data
Source=10.10.10.101,1433;Initial Catalog=MapLayers; UID=coresqluser;
PWD=OeQu_!102")
Dim cmd As SqlClient.SqlCommand
Dim objDataReader As SqlClient.SqlDataReader
Dim strSQL As String
Dim basename As String
Dim appt As String
Dim last_upd As String
Dim n As Integer

appt = Request.QueryString("atype")
basename = Request.QueryString("thebase")

Conn2.Open()

strSQL = "SELECT * from site_name WHERE site_name.site_id = '" & basename &
"';"
cmd = New SqlClient.SqlCommand(strSQL, Conn2)
objDataReader = cmd.ExecuteReader
It errors on the "Imports" line....If I remove it, I get am error on the
first DIM. It seems the problem is with the SqlClient class. If I put

.NET
framework on a machine without SQL Server, are these connectors

installed?
Any ideas or suggestions would be appreciated,

Tony Zoccolillo


Nov 18 '05 #3

P: n/a
I'm fairly new to .NET and I 'm not 100% sure what you mean. I have a
reference to System, System.Data, System.Design, System.Drawing, System.Web,
System.Windows.Forms and System.XML. Copy Local is False on all. If I set
Copy Local to true, will it put the dlls in my bin and distributed when I
copy remote? Shouldn't these refs already be on a system with .NET
Framework installed?

thanks,
TZ
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:eA****************@TK2MSFTNGP10.phx.gbl...
Have you set a reference to the .dll? If so, perhaps you should set it to
make a local copy, as a workaround.

"Tony Zoccolillo" <to*****@hotmail.com> wrote in message
news:Ob****************@TK2MSFTNGP11.phx.gbl...
This line should read...

Source=10.10.10.101,1433;Initial Catalog=MapLayers; User ID=coresqluser;
Password=OeQu_!102")


"Tony Zoccolillo" <to*****@hotmail.com> wrote in message
news:uN******************@tk2msftngp13.phx.gbl...
I have a SQL Server database on a Windows 2000 Server. I have IIS running on a 2nd 2000 Server with no SQL Server on it.. Neither are the PDC.

Both
servers have the most recent .NET framework installed.

When I try to connect from my aspx page using SqlClient I get an error

right
away. My code looks something like...

Imports System.Data.SqlClient

Dim Conn2 As New SqlClient.SqlConnection("Data
Source=10.10.10.101,1433;Initial Catalog=MapLayers; UID=coresqluser;
PWD=OeQu_!102")
Dim cmd As SqlClient.SqlCommand
Dim objDataReader As SqlClient.SqlDataReader
Dim strSQL As String
Dim basename As String
Dim appt As String
Dim last_upd As String
Dim n As Integer

appt = Request.QueryString("atype")
basename = Request.QueryString("thebase")

Conn2.Open()

strSQL = "SELECT * from site_name WHERE site_name.site_id = '" & basename
&
"';"
cmd = New SqlClient.SqlCommand(strSQL, Conn2)
objDataReader = cmd.ExecuteReader
It errors on the "Imports" line....If I remove it, I get am error on the first DIM. It seems the problem is with the SqlClient class. If I
put .NET
framework on a machine without SQL Server, are these connectors

installed?
Any ideas or suggestions would be appreciated,

Tony Zoccolillo



Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.