Option Value Changed - ODBC Error 2169
- by fredrick-ughimi
Hello Edgar,
Thank you for your response.
I am using Powerbasic (www.powerbasic.com) as my compiler and SQLTools as a third party tool to access ADS through ODBC.
I must stat that this error also appers when I take other actions like Update, Delete, Find, etc. But I don't
get this error when I am using MS Access.
Here is my save routine:
[Code]
Local sUsername As String
Local sPassword As String
Local sStatus As String
Local sSQLStatement1 As String
sUsername = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_TXTUSERNAME)
If Trim$(sUsername) = "" Then
MsgBox "Please, enter Username", %MB_ICONINFORMATION Or %MB_TASKMODAL, VD_App.Title
Control Set Focus nCbHndl, %ID_FRMUPDATEUSERS_TXTUSERNAME
Exit Function
End If
sPassword = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_TXTPASSWORD)
If Trim$(sPassword) = "" Then
MsgBox "Please, enter Password", %MB_ICONINFORMATION Or %MB_TASKMODAL, VD_App.Title
Control Set Focus nCbHndl, %ID_FRMUPDATEUSERS_TXTPASSWORD
Exit Function
End If
sStatus = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_CBOSTATUS)
sSQLStatement1 = "INSERT INTO [tblUsers] (Username, Password, Status) " + _
"VALUES ('" + sUsername + "','" + sPassword + "','" + sStatus +"')"
'Submit the SQL Statement to the database
SQL_Stmt %SQL_STMT_IMMEDIATE, sSQLStatement1
'Check for errors
If SQL_ErrorPending Then
SQL_MsgBox SQL_ErrorQuickAll, %MSGBOX_OK
End If
[/code]
Best regards,