Hi, I'm getting an access violation opening a TIBSQL or TIBQuery after upgrading my project to XE 7. The error is being raised in procedure TIBSQL.Prepare and is happening on the following line:
bt := Database.Encoding.GetBytes(FProcessedSQL.Text + #0);
I'm guessing there's a new property added to one of the IBX components that's not being set.
Any ideas?
Thanks,
Dan Palley
Jeff,
I'll give the work-around a try. For now, creating a separate connection works fine.
Thanks,
Dan
> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
>
> Yes this was a performance enhancement to not create/destroy the same encoding
> over and over. Since it is based on the lc_ctype at connect time it is created
> only then and reused over and over. It is also, unfortunately for you, read only.
>
> The Encoding is only destroyed when the IBDatabase is destroyed or when a new
> connection is made so one workaround might be Connect with IBDatabase,
> disconnect (should leave the correct encoding) then connect FireDAC and share
> the handle.
>
> --
> Jeff Overcash (TeamB)
> (Please do not email me directly unless asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted corridors of Whitehall.
> (Fish)
Dan Palley wrote:
> Hi Jeff,
>
> I think I found the issue. It looks like setting the encoding moved from the Prepare method to the Connect method in XE 7. I'm not using Connect since I'm sharing a database handle that's opened using FireDAC, so I'm calling SetHandle instead, which doesn't seem to set the encoding.
>
> Dan
>
Yes this was a performance enhancement to not create/destroy the same encoding
over and over. Since it is based on the lc_ctype at connect time it is created
only then and reused over and over. It is also, unfortunately for you, read only.
The Encoding is only destroyed when the IBDatabase is destroyed or when a new
connection is made so one workaround might be Connect with IBDatabase,
disconnect (should leave the correct encoding) then connect FireDAC and share
the handle.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)
Hi Jeff,
I think I found the issue. It looks like setting the encoding moved from the Prepare method to the Connect method in XE 7. I'm not using Connect since I'm sharing a database handle that's opened using FireDAC, so I'm calling SetHandle instead, which doesn't seem to set the encoding.
Dan
> What is the value of FProcessedSQL.Text. Also what version are you coming from?
> This code really hasn't changed since the Unicode stuff was back in D2009 (?).
>
> --
> Jeff Overcash (TeamB)
> (Please do not email me directly unless asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted corridors of Whitehall.
> (Fish)
Dan Palley wrote:
> Hi, I'm getting an access violation opening a TIBSQL or TIBQuery after upgrading my project to XE 7. The error is being raised in procedure TIBSQL.Prepare and is happening on the following line:
>
> bt := Database.Encoding.GetBytes(FProcessedSQL.Text + #0);
>
> I'm guessing there's a new property added to one of the IBX components that's not being set.
>
> Any ideas?
>
> Thanks,
>
> Dan Palley
What is the value of FProcessedSQL.Text. Also what version are you coming from?
This code really hasn't changed since the Unicode stuff was back in D2009 (?).
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)