Received: from orion3.ori-ind.com (IDENT:root@[206.81.197.190]) by hub.org (8.10.1/8.10.1) with ESMTP id e72001B64381 for ; Tue, 1 Aug 2000 20:00:01 -0400 (EDT) Received: from ken (stimpy.ori-ind.com [192.168.61.96]) by orion3.ori-ind.com (8.8.7/8.8.7) with SMTP id RAA06155; Tue, 1 Aug 2000 17:00:06 -0700 Message-Id: <3.0.1.32.20000801165716.00a44c10@ori-ind.com> X-Sender: ken@ori-ind.com X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Tue, 01 Aug 2000 16:57:16 -0700 To: Kovacs Zoltan Sandor From: "Ken J. Wright" Subject: Re: Function sequence error with ODBCExpress Cc: pgsql-interfaces@postgresql.org In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Archive-Number: 200008/12 At 01:57 08/02/2000 +0200, Kovacs Zoltan Sandor wrote: >> Commiting or Aborting the inserted rows will work fine, whether you're inserting >> the rows positionally or using an INSERT SQL statement, however after you commit >> or abort (or probably before you commit or abort) you must close the result >> sets, since the ODBC driver you're using will cause the result set cursors to be >> closed on the commit or abort (and tehreby causing function sequence errors when >> you try to access the result sets afterwards). Afterwards you can open the >> result sets again. >> >> ------------------------------------------------------------------------ >> >> End of quoting. Is the solution what the answers suggest? It would be >> great if the result sets need not to be closed. What is your solution for >> this? > >The things above seem to be true: each dataset should be closed and then >all must be reopen which is linked to a grid. Now there is no "Function >sequence error" for us, but it is painful to close them datasets all the >time... :-( I can't remember the odbc driver insides well enough, but I'll check tomorrow. Maybe Byron is listening? Anyway, I use ODBCExpress with Delphi in both forms and grids without trouble. But I don't use COMMITs or ABORTs directly. The OE api handles all the low end stuff quite well when using grids and such. I'll use exception handling when executing hstmt sql statements. I only need to close/reopen datasets when keeping detail datasets current with their master. OE is (was?) sometimes not reliable with automatic master/detail grids. But I've never had to close/reopen with each insert/update/delete in a dataset. Ken