Thanks Nevan,
I have been having a lot of problems today with ADO, but I seem to have
fixed them up. I set the CursorLocation := clUseServer and that cured most
of the problems.
After getting that OK, I found another problem.
I was appending a record and setting some values, and posting the changes. I
then called another routine that opened the same table, found the record by
ID using Locate and then generated a report, it then edited about 5 fields
and saved the changes, then the original table re-edited the record, and
when it saved the changes again I got a message saying that two people were
editing the record at the same time. This had me lost for ages, and in the
end I used a separate connection string and the problem went away. Well I
hope it went away, because I was at a total loss...
Thanks for your suggestions.
ps: If you have any pointers regarding the multiple connections I would be
appreciated.
I created a new table object (TAdrockCCADOTable) from the TADOTable and in
the Initialization of the unit I created a TADOConnection and setup its
properties, and then in the Constructor of the TAdrockCCADOTable I set the
connection to the TADOConnection I created in the Initialization section.
I do not know if this is a good method, but it sure cut down the work
required to get the app working again.
Chris
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Neven MacEwan
Sent: Tuesday, 11 January 2000 10:29
To: Multiple recipients of list delphi
Subject: Re: [DUG]: ADO Express Table - Errors returned when deleting
the record.
Chris
Play with the Cursor Position and CursorType
Regards
Neven
----- Original Message -----
From: Chris Crowe <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Monday, 10 January 2000 17:55
Subject: [DUG]: ADO Express Table - Errors returned when deleting the
record.
> I am getting a strange error when I try to delete a record.
>
> This is what I have done
>
> 1) Drop on a TADO Table, and Connection Object
> 2) drop on a TDataSource, and link to the TADO Table
> 3) Drop on a TDBGrid and align to the client
> 4) Drop on a TDBNavigator and align to the top
> 5) Set the connection Object to use this connection string
>
> Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;User
> ID=Admin;Data Source=E:\Projects\Delphi\Delphi
> 5\AdrockCallCentral\DB\AdrockCallCentral.MDB;Mode=Share Deny None;Extended
> Properties=";COUNTRY=0;CP=1252;LANGID=0x0409";Locale Identifier=1033;Jet
> OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database
> Password="";Jet OLEDB:Global Partial Bulk Ops=2
>
> 6) Set the TableName property to a table, and open the table
> 7) Run the program
>
> 7) Add a new record
> 8) Post the changes to the record
> 9) Delete the record
>
> I then get this error:
>
> Exception: EDatabaseError
>
> "The specified row could not be located for updating: Some values may have
> been changed since it was last read"
>
> What can I do to stop this?, I am at a loss here.
>
> Chris
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz