Re: Best way to find ID of new record



John wrote on Fri, 24 Mar 2006 07:07:02 -0800:

Thanks Dan!
When I get back to the program using SQL Server, I'll try the adUseServer
and see if it makes a difference. I did not specify (knowingly)
adUseServer or otherwise. That might solve the problem there.

The default for a recordset is adUseClient, but will switch to a server side
cursor location if the cursor type used requires it. I've never had a
problem yet using this method on SQL Server so long as I use adUseServer for
the CursorLocation property and adOpenKeyset for the CursorType property,
and I tend to use adLockOptimistic for the LockType.

Dan


.



Relevant Pages

  • Multiple-step Operations Generated Errors
    ... Create table client (id int identity (1,1), ... When I try to insert a new record the SQL Server must return two values: ... It is work fine if CursorLocation property is clUseServer. ...
    (borland.public.delphi.database.ado)
  • Re: Multiple-step Operations Generated Errors
    ... >When I try to insert a new record the SQL Server must return two values: ... >It is work fine if CursorLocation property is clUseServer. ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)