I am currently developing an application using vb.net 2005 and windows mobile 6 sdk,and sql server ce for my database.
I try to connect to the database i created using the following code: I get an identifier expected error
pointing the dot[.] .The code is this
("Data Source ="[B].[/B]\ MyDatabase.sdf;"") Visual Basic.Net 2005. The whole class is the following:
Dim conn As SqlCeConnection = Nothing Try conn = New SqlCeConnection("Data Source =".\ MyDatabase.sdf;"") conn.Open() Dim cmd As SqlCeCommand = conn.CreateCommand() cmd.CommandText = "INSERT INTO Customers (Customerid], Name) Values('9', 'Smith')" cmd.ExecuteNonQuery() Finally conn.Close() End Try