A
Andy Baker
Our application is written in VB.NET 2003 and uses SQL Server 2000. We have
a customer who wants to upgrade SQL Server 2005, so I recently installed the
developer edition to check whether it worked with our application. I changed
the connection string on the PC application to point to the new instance of
SQL server, and to my surprise it worked and connected to 2005 without any
changes in code. However when I made the same changes on the application
that accesses SQL server from CE.NET devices, it didn't and I get the error
message 'SQL server does not exist or access denied'. The code that I am
using is:
Dim cn as SqlConnection
cn = New SqlConnection("Data Source=xxx.xxx.xxx.xxx; Initial
Catalog=Vanputer; User Id=****; Password=****")
cn.Open
where the IP address is the address of the PC where SQL Server 2005 is
installed, Vanputer is name of the database in SQL Server 2005, and User Id
and Password are set up as a user in SQL Server 2005. All I have done has
changed the IP address from the server where SQL Server 2000 is installed to
the one where 2005 is installed, backed up the database from 2000 and
restored to 2005. My questions are:
1) Is it possible to connect to SQL Server 2005 from VB.NET 2003 and
compact framework 1.1 or do I have to use VB.NET 2005?
2) If it is possible, what else am I doing wrong? Do I have to install
anything else on the PC where 2005 is installed to allow access from CE
devices, or can I change the connection string / use ODBC instead of
SqlConnection?
Thanks in advance
Andy Baker
a customer who wants to upgrade SQL Server 2005, so I recently installed the
developer edition to check whether it worked with our application. I changed
the connection string on the PC application to point to the new instance of
SQL server, and to my surprise it worked and connected to 2005 without any
changes in code. However when I made the same changes on the application
that accesses SQL server from CE.NET devices, it didn't and I get the error
message 'SQL server does not exist or access denied'. The code that I am
using is:
Dim cn as SqlConnection
cn = New SqlConnection("Data Source=xxx.xxx.xxx.xxx; Initial
Catalog=Vanputer; User Id=****; Password=****")
cn.Open
where the IP address is the address of the PC where SQL Server 2005 is
installed, Vanputer is name of the database in SQL Server 2005, and User Id
and Password are set up as a user in SQL Server 2005. All I have done has
changed the IP address from the server where SQL Server 2000 is installed to
the one where 2005 is installed, backed up the database from 2000 and
restored to 2005. My questions are:
1) Is it possible to connect to SQL Server 2005 from VB.NET 2003 and
compact framework 1.1 or do I have to use VB.NET 2005?
2) If it is possible, what else am I doing wrong? Do I have to install
anything else on the PC where 2005 is installed to allow access from CE
devices, or can I change the connection string / use ODBC instead of
SqlConnection?
Thanks in advance
Andy Baker