We are deploying a SQLAnywhere solution on Windows CE 5.0 devices and are running into an error in our first SQL statement.
Definitions are...
Dim dbf As String = "dbf=\Program Files\sfpwarehousescanner\BRAINY2_remote.udb"
Public conn As ULConnection = New iAnywhere.Data.UltraLite.ULConnection(dbf)
Public cmdDel As ULCommand
Public cmdSel As ULCommand
Public cmdUpd As ULCommand
The offending code...
Public Sub GetDefaults()
Dim SQL As String = ""
Try
SQL = "SELECT ISNULL(Dot, 'T'), ISNULL(Distance, 'L'), ISNULL(Force_Change, 'Y') " _
& "FROM cims.scan_settings " _
& "WHERE username = '" + UName.ToString + "'"
cmdSel = conn.CreateCommand()
cmdSel.CommandText = SQL
Dim ULReader As ULDataReader
ULReader = cmdSel.ExecuteReader
The error we are receiving is...
Error (level = 7) in General.GetDefaults:
IDS_AMP_INVALID_OPER_ON_EXECUTE_CMD -
SELECT ISNULL(Dot, 'T'), ISNULL(Distance, 'L'), ISNULL(Force_Change, 'Y')
FROM cims.scan_settings WHERE username = 'test'
Any help is greatly appreciated!
I have now simplified the sql to be 'SELECT * FROM scan_settings' and I still have the same problem.