Some little feelings about the Execsql and Open methods of the AdoQuery control

xiaoxiao2021-03-06  17

Some little feelings about the EXECSQL and Open methods of the AdoQuery control: I just started to design the database control, not very familiar with the control of AdoQuery, in executing the SQL statement is, I just started using the Open method, in SELECT is correct, However, when the program is used in Insert, it can be compiled, but the execution is wrong, the error message is: AdoQuery1: CommandText DoQuery1: CommandText Does NOT RETURN A Result Set | I am reversible test finally discovered using the ExecSql method to run normally The program does not generate any errors, returning to thinking, the original execSQL method is for statements such as delete INSERT and UPDATE, and for SELECT, it is recommended to use the Open method as well, and the execSQL method does not generate the return value, and the Open method is There will be a return value, eventually leading to my program error.

转载请注明原文地址:https://www.9cbs.com/read-41607.html

New Post(0)