Board index » delphi » error creating cursor handling for TQuery component with Insert SQL command
Suyada Libprapakorn
![]() Delphi Developer |
Fri, 13 Sep 2002 03:00:00 GMT
|
Suyada Libprapakorn
![]() Delphi Developer |
Fri, 13 Sep 2002 03:00:00 GMT
error creating cursor handling for TQuery component with Insert SQL command
Hi,
I am now deviloping 3-tiers application . and I have problem when I Insert data to table uses TQuery component. It's show error message ' Error creating cursor handling' , I use this component both in app server and client app. In client app , I send parameters to TQuery component in Remote data module of app server. It difference that Exception class of app server is ENoResultSet and in client app the Exeption class is EOLE code in app server like this I dont know what a mistake of this code , anybody tell me the right |
Team
![]() Delphi Developer |
Fri, 13 Sep 2002 03:00:00 GMT
Re:error creating cursor handling for TQuery component with Insert SQL commandYou shouldn't be opening non select statments. You should ExecSQL instead. Insert SQL does not return a cursor and therefor Open can't create a cursor handle for it. Your use of Prepare and Unprepare is wrong too. Prepare the SQL once before the loop and unprepare it once after the loop is completed. QuoteSuyada Libprapakorn wrote: Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) If there is somebody up there could they throw me down a line. Just a little helping hand just a little understanding. Just some answers to the questions that surround me now. If there's somebody up there could they throw me down a line. (Fish) |
Suyada Libprapakor
![]() Delphi Developer |
Sat, 14 Sep 2002 03:00:00 GMT
Re:error creating cursor handling for TQuery component with Insert SQL commandand in client app , I use sendparams method , but if SQL command is Insert ,it's has the same problem , Error Message'Error creating cursor handling' Exception class is EOleException, what method I should use to send this params to app server. a line of code is clientdataset1.close; clieantdataset1.params[0].AsInteger := ID; clientdataset1.open; clientdataset1.sendparams; I think error from open clientdatset , but if it dont open clientdataset , it cant insert to database. what is the right code for this .. thanks. Quote"Jeff Overcash (TeamB)" wrote: |
Suyada Libprapakor
![]() Delphi Developer |
Sat, 14 Sep 2002 03:00:00 GMT
Re:error creating cursor handling for TQuery component with Insert SQL commandand if I send params for TQuery component with insert command , if I cant open clientdataset,so cant insert data to database , what the right coding for this operation. my code is clientDataset1.close; clientDataset1.params[0].asInteger := ID; clientDataset1.open; clientDataset1.sendparams; Quote"Jeff Overcash (TeamB)" wrote: |
Suyada Libprapakor
![]() Delphi Developer |
Sat, 14 Sep 2002 03:00:00 GMT
Re:error creating cursor handling for TQuery component with Insert SQL commandand if I send params for TQuery component with insert command , if I cant open clientdataset,so cant insert data to database , what the right coding for this operation. my code is clientDataset1.close; clientDataset1.params[0].asInteger := ID; clientDataset1.open; clientDataset1.sendparams; Quote"Jeff Overcash (TeamB)" wrote: |
1. Error creating cursor handle with an INSERT SQL query
2. Insert Query: ENoResultSet -- Error Creating Cursor Handle
3. SQL: "Error creating cursor handle"
4. SQL problem (error creating cursor handle)
5. Error creating cursor handle, in a Local SQL statement
6. Error creating handle with a SQL INSERT query
7. ENoResultSet error message with error creating cursor handle
8. ERROR : 'error creating cursor handle'