Re: An unknown error has occured...



What version of Delphi and ADO? There was a version of Delphi ADO that was a
bit buggy and would crash on a locate if the record was not found. The code you
outlined below is the same that is used on the locate statement.

-Steve-

"Karl-Gunnar Hultland" <karl-gunnar.hultland@xxxxxxxxxx> wrote in message
news:43f99660$1@xxxxxxxxxxxxxxxxxxxxxxxxx
I have a problem using the ADO components connectiong to a MS SQL 2000
server.

I use a TADO Dataset and need to insert a new post into that dataset. But
when I execute the code I get an unknown exception on the first and second
line. (Project raised exception class EOleException with message "Ett okänt
fel har uppstått." (An unknown error has occured)

If I select break to get into debug mode I am inside the function
TCustomADODataSet.LocateRecord and on the line

if FieldCount = 1 then
FLookupCursor.Find(GetFilterStr(FieldByName(KeyFields), eyFields), KeyValues,
Partial), 0, adSearchForward, EmptyParam)



.