|
-
Sep 13th, 2007, 03:36 AM
#1
Thread Starter
New Member
DataSource on windows mobile 6 (cant connect to sqlce database file [sdf])
Hi,
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 =".\ 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|