Again, you're using really old stuff in combination with the newest stuff.
If you're trying to connect "from Visual Studio", you mean through the
Server Explorer? I almost never use that, so I can't tell you what's going
on. Read the help and verify that you can do that with that version of the
server from VS2008. Maybe the server requires a user name and password and
you aren't giving it. Maybe you're identifying the server you're trying to
connect to incorrectly (wrong name, wrong IP, wrong whatever). Maybe the
server isn't set up to allow TCP/IP connections.
All I can tell you is that VS2008 works fine with SQL Server 2005 and so
does .NET CF 3.5 with the SQL CE client. If you still want to try to get
this desktop-to-desktop connection working and can't, I'd suggest that you
ask about *that* in an SQL Server group. That question has nothing to do
with SQL Server CE, does it?
Paul T.
> Paul
> I have tried to connect to the Northwind data base that is on SQL 2000
[quoted text clipped - 67 lines]
>> >> > Thank You
>> >> > Matt
MutlyP - 01 Dec 2008 19:37 GMT
Hi Paul
I am going to try this one last time and if you still think I am using old
stuff than I will no longer bother you.
I have one develope machine on that machine I have installed Microsoft SQL
Server 2000 (personal edition), Visual Studio 2008.
All I want to do is down load is the Country from the Customers table in the
Northwind database into a ComboBox. The ComboBox is on a Form in a Smart
Device Project in Visual Studio 2008.
(Opened Visual Studio 2008 clicked on Create Project. New Project window
opens I clicked on Smart Device and then choose Smart Device Project and .Net
Framework 3.5.)
In the Form1_Load I have this code:
Dim sConnection As String = "Data Source=(local);Initial
Catalog=Northwind;User ID=csInfo;Password=csInfo;"
Dim sSQL As String = "SELECT DISTINCT Country FROM Customers ORDER
BY Country"
Dim comm As SqlCommand = New SqlCommand(sSQL, New
SqlConnection(sConnection))
Dim dr As SqlDataReader = Nothing
Try
comm.Connection.Open()
dr = comm.ExecuteReader
While dr.Read
cboCountries.Items.Add(dr(0))
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
Return
End Try
dr.Close()
comm.Connection.Close()
End Sub
I run this and get the "Can't find Server or Access Denied".
Like I said I made sure port 1433 is being used, I changed the name of the
server in the code to the IP address and turned off both Firerwalls that are
on my computer.
If I run the exact same code in a regular projcet (Not a Smart Device
Project) it runs fine.
Again sorry if this should be in another form but you say that SQL Server
2000 is old but I read nothing that Visual Studio 2008 does not work with SQL
Server 2000. My web connections and desktop project connections to SQL Server
2000's databases. It's just the Smart Device.
Any ideas?
Thanks for all your help.
Matt
> Again, you're using really old stuff in combination with the newest stuff.
> If you're trying to connect "from Visual Studio", you mean through the
[quoted text clipped - 84 lines]
> >> >> > Thank You
> >> >> > Matt
Paul G. Tobey [eMVP] - 01 Dec 2008 20:43 GMT
That won't work because you have a connection string that can't be correct.
You're saying that the database is (local), but it's not; it's on your PC,
right? Not on the Smart Device? If you set the Data Source to something
reasonable, I don't see anything else wrong with it, but yes, you are using
a very old version of the SQL Server software. I would also strongly
suspect that anything with "Personal Edition" in its name is not going to be
network-accessible. It would probably work if you wrote a PC program to
access the database on the same machine, but your smart device is just like
another PC on the network.
Paul T.
> Hi Paul
> I am going to try this one last time and if you still think I am using old
[quoted text clipped - 154 lines]
>> >> >> > Thank You
>> >> >> > Matt