我試圖在同一個director上連接database.sdf。使用下面的代碼,但給我連接錯誤。我做錯了什麼。請幫幫我。連接字符串有什麼問題
Dim connstring As String
Dim con As SqlCeConnection
Dim command As SqlCeCommand
connstring = "Persist Security Info = False; Data Source = '.\database.sdf', Password = 'pswrd', File Mode = 'shared read'"
con = New SqlCeConnection
con.Open()
command = New SqlCeCommand("select * from users where Name=? and Password=?", con)
您可能會分享您正在收到的連接錯誤? – 2010-06-04 16:05:29