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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • innesaji
    New Member
    • Jul 2008
    • 4

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

    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\i nventoryProgram \inventoryProgr am\invDB.sdf"
    Code:
    Dim conn = New SqlCeConnection("Data Source = invDB.sdf")
            Try
                conn.Open()
    
            Catch ex As SqlCeException
                MsgBox(ex.Message)
    
            End Try
    Last edited by innesaji; Jul 24 '08, 03:53 AM. Reason: added language and application
  • innesaji
    New Member
    • Jul 2008
    • 4

    #2
    Forgot to write that the error was that the database file could not be found.
    Thanks.

    Comment

    Working...