CodePudding user response:
Insert into table (rcpt_no, patient_id) values (ls_no, : ls_id) using the sqlca.Grammar that's right.
Must be ls_no, ls_id has a problem. Or type does not match.
If the sqlca. Sqlcode & lt;> 0 then
Messagebox (" prompted!" , "insert failed!" )
Return
End
The sqlca. Sqlcode & lt;> 0 indicates the SQL statement execution is not successful.
CodePudding user response:
Insert into table (rcpt_no, patient_id) values (ls_no, : ls_id) using the sqlca.-- -- --
Does this sentence right
1, you first test ls_no ls_id whether does have value, using messagebox (', ') returns a see will know that
2, the sqlca sqlcode & lt;> 0
SQL statement execution is not successful.
Add the following statement test why wrong
Insert into table (rcpt_no, patient_id) values (ls_no, : ls_id) using the sqlca.
IF the SQLCA. SQLCode=1 THEN
MessageBox (" SQL error ", the SQLCA SQLErrText)
END the IF
3, the enclosed SQLCODE error description
The Value a fancy
0 Success
100 Fetched row not found
- 1 Error; The statement failed. Use SQLErrText or SQLDBCode to obtain the detail.
CodePudding user response:
Support her Lord, collection