By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,426 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,426 IT Pros & Developers. It's quick & easy.

Can't connect to server Visual Basic - Smart Device Application - Visual Studio 2008

innesaji
P: 4
I'm trying to connect to a database and am using the emulator (windows mobile 5 r2) could someone tell me what i'm doing wrong? I've also tried using the connection string in the properties of the datasource..
"Data Source=C:\Users\Adam\Documents\Visual Studio 2008\Projects\inventoryProgram\inventoryProgram\in vDB.sdf"
Expand|Select|Wrap|Line Numbers
  1. Dim conn = New SqlCeConnection("Data Source = invDB.sdf")
  2.         Try
  3.             conn.Open()
  4.  
  5.         Catch ex As SqlCeException
  6.             MsgBox(ex.Message)
  7.  
  8.         End Try
Jul 24 '08 #1
Share this Question
Share on Google+
1 Reply


innesaji
P: 4
Forgot to write that the error was that the database file could not be found.
Thanks.
Jul 24 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.