Hi everyone,
I was wondering if anyone can help!
I'm writing an application on WM5 in VB and I'm having problems with SDF database files on the "Storage Card". I understand the concept of the connection being lost if the device hibernates BUT I can't find any information on how to reistablish the connection without getting the "Unspecified Error" of doom. (ExecuteResultSet: Connection property has not been initialized)
I know this can be fixed by moving the database files to main memory but they're 28Mb in total so they won't leave much room for anything else.
The code (which I borrowed from here) works fine until there's hibernation sleep/wake thingy and then it'll crash if it's run again!
----------------------------------------------------------------------------------------------------------------------------------------------------
Dim sql As String Dim _conn As Data.SqlServerCe.SqlCeConnection Dim cmd As New Data.SqlServerCe.SqlCeCommand()Cursor.Current = Cursors.WaitCursor
_conn =
New Data.SqlServerCe.SqlCeConnection("Data Source = \Storage Card\ZML\ZMLjumpers.sdf") Try_conn.Open()
Catch ex As ExceptionMsgBox(
"error on open " & ex.Message.ToString) End Trysql =
"SELECT * FROM expdt"cmd.Connection = _conn
cmd.CommandText = sql
Cursor.Current = Cursors.WaitCursor
Dim rsCustomers As Data.SqlServerCe.SqlCeResultSet = cmd.ExecuteResultSet(Data.SqlServerCe.ResultSetOptions.Scrollable)----------------------------------------------------------------------------------------------------------------------------------------------------
If anyone can shed any light on this it'd be greatly appreciated.
Cheers
Phil (UK)
PS ### Help for Noobs like me top tip ### To save a few people some hunting around ... if you want to convert a Access MDB database into a WM friendly format (SDF) lookup "Primeworks" on t'internet!! Works a treat!!