SqlClient remote connection problems

  • Thread starter Tony Zoccolillo
  • Start date
T

Tony Zoccolillo

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
 
T

Tony Zoccolillo

This line should read...

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

Rick Spiewak

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

Tony Zoccolillo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top