I have lots of experience with VB-Dos/VB6 and Btrieve/Pervasive SQL programming. Now I'm trying to learn VB.Net with MS SQL Server CE 3.5. (Express Editions at present). I need a jump-start please![]()
I've created a database called TestDatabse.sdf with one table called Customers. I've been searching the web and trying all sorts of connection strings, and now I'm back to basics.
This is the error I'm getting:
Message="An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
Could someone please get me startedCode:Private Sub ReadData() Dim conn As SqlConnection = New SqlConnection("Data Source=D:\Visual Studio 2008\Projects\Test_SQL\Test_SQL\TestDatabase.sdf") conn.Open() ' Read some data from a Table conn.Close() End Sub
PS: I just need to establish the connection at this stage. I've already got a working app to retrieve the data with DataReader and a Pervasive SQL connection.



Reply With Quote