Board index » delphi » TSQLClientDataset.Locate against IB6.01 Access Violation?

TSQLClientDataset.Locate against IB6.01 Access Violation?

I'm getting sporadic Access Violations in the following line of code:

if ffTblMessage.Locate('MSGID', trim(inMessage.MsgId), [loCaseInsensitive])
then

   where ffTblMessage is a TSQLClientDatastet, the MSGID field is defined in
the IB6 (Firebird Beta) database as a CHAR(128), and inMessage.MsgId is a
string. By the time my code gets to this line, the ffTblMessage has
successfully been opened already.

   Are there any known issues with using dbExpress against Interbase that
might explain this AV? Is there any known workaround? This AV seems to be
far more common when more than one connection from within the app is
accessing the database (the app is multithreaded with a unique
TSQLConnection for each thread). WaitOnLocks was false.

TIA.

--
Visit Jake's Delphi Page at http://www.xnet.com/~johnjac
Home of VCL2CLX, TMultiThreadedPropertyComponent, "Delphi versus Visual
C++", Jake's Code Efficiency Challenge and more.

 

Re:TSQLClientDataset.Locate against IB6.01 Access Violation?


No, but there is a serious bug related to variants which is used
heavily by locate.  6.01 has been pulled and you should have
gotten an e-mail telling you to not use the 6.01 until the problem
is fixed.

Quote
John Jacobson wrote:
> I'm getting sporadic Access Violations in the following line of code:

> if ffTblMessage.Locate('MSGID', trim(inMessage.MsgId), [loCaseInsensitive])
> then

>    where ffTblMessage is a TSQLClientDatastet, the MSGID field is defined in
> the IB6 (Firebird Beta) database as a CHAR(128), and inMessage.MsgId is a
> string. By the time my code gets to this line, the ffTblMessage has
> successfully been opened already.

>    Are there any known issues with using dbExpress against Interbase that
> might explain this AV? Is there any known workaround? This AV seems to be
> far more common when more than one connection from within the app is
> accessing the database (the app is multithreaded with a unique
> TSQLConnection for each thread). WaitOnLocks was false.

> TIA.

> --
> Visit Jake's Delphi Page at http://www.xnet.com/~johnjac
> Home of VCL2CLX, TMultiThreadedPropertyComponent, "Delphi versus Visual
> C++", Jake's Code Efficiency Challenge and more.

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

http://www.bss-software.com

Re:TSQLClientDataset.Locate against IB6.01 Access Violation?


Quote
"tmiller" <tmil...@bss-software.com> wrote in message

news:3BB77FDC.7010105@bss-software.com...

Quote
> No, but there is a serious bug related to variants which is used
> heavily by locate.  6.01 has been pulled and you should have
> gotten an e-mail telling you to not use the 6.01 until the problem
> is fixed.

   Actually I am using the unpatched D6. It was my version of Interbase that
was version 6.01, not Delphi.

--
Visit Jake's Delphi Page at http://www.xnet.com/~johnjac
Home of VCL2CLX, TMultiThreadedPropertyComponent, "Delphi versus Visual
C++", Jake's Code Efficiency Challenge and more.

Re:TSQLClientDataset.Locate against IB6.01 Access Violation?


Ooops!  Sorry for the confusion.  Haven't heard anything.  The only
big problem seems to be a thread safety issue with the client.

Quote
John Jacobson wrote:
> "tmiller" <tmil...@bss-software.com> wrote in message
> news:3BB77FDC.7010105@bss-software.com...

>>No, but there is a serious bug related to variants which is used
>>heavily by locate.  6.01 has been pulled and you should have
>>gotten an e-mail telling you to not use the 6.01 until the problem
>>is fixed.

>    Actually I am using the unpatched D6. It was my version of Interbase that
> was version 6.01, not Delphi.

> --
> Visit Jake's Delphi Page at http://www.xnet.com/~johnjac
> Home of VCL2CLX, TMultiThreadedPropertyComponent, "Delphi versus Visual
> C++", Jake's Code Efficiency Challenge and more.

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

http://www.bss-software.com

Re:TSQLClientDataset.Locate against IB6.01 Access Violation?


Quote
John Jacobson wrote:

> I'm getting sporadic Access Violations in the following line of code:

> if ffTblMessage.Locate('MSGID', trim(inMessage.MsgId), [loCaseInsensitive])
> then

        Build with Debug DCUs and see if you can get a more specific error
location.  Use Find Error if the de{*word*81} doesn't stop in a logical
place.

Quote

>    where ffTblMessage is a TSQLClientDatastet, the MSGID field is defined in
> the IB6 (Firebird Beta) database as a CHAR(128), and inMessage.MsgId is a
> string.

        Firebird is different than InterBase and errors in Firebird may or may
not occur in InterBase.

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
We're hiring: http://www.vertexsoftware.com/careerops.htm#sd
     Delphi/InterBase WebLog: http://delphi.weblogs.com

Other Threads