This are my global variables where I declare the connection settings:
The *** is to keep that site hidden, sorry to do this, but my school has had hacker problems. I'm just being careful.
Private DBName As String = "\My Documents\dokter.sdf"
Private localDBConnection As String = "Data Source = " & DBName
Private IISUrl As String = "ftp://***/private/dokter.mdb"
Private serverDBConnection As String = "Provider=OLEDB.4.0;Data Source=(local);Initial Catalog=dokter.mdb"
And here is how I try to make the connection.
The point is to download the database from the server to my handheld.
Dim connectie As SqlCeConnection = New SqlCeConnection(localDBConnection)
Dim command As SqlCeCommand = New SqlCeCommand("Select id, uur From tblAfspraak Where datum = " & Now().Date, connectie)
Dim reader As SqlCeDataReader = command.ExecuteReader()
Do While reader.Read
And yes, the language is VB.NET 2005.