Delphi XE4 with UniDAC getting Access violation error

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Goaul
Posts: 4
Joined: Mon 02 Sep 2013 19:07

Delphi XE4 with UniDAC getting Access violation error

Post by Goaul » Sat 07 Sep 2013 20:46

Hello,

Using Delphi XE4 32bit, i migrated from ZeosLib 7.2alpha to UniDAC 5.0.2 Pro, by using these topics:
http://forums.devart.com/viewtopic.php?t=20007
http://forums.devart.com/viewtopic.php?t=16574

Im using wampserver with mysql 5.5.24. My VCL(non FireMonkey) program 32bit can connect with db fine, but when trying to commit something to db im getting Access violation error:
http://snag.gy/yAFAT.jpg
http://snag.gy/XtAGm.jpg

In TUniConnection is used:

Code: Select all

SpecificOptions.Strings = (
      'MySQL.Direct=True'
      'MySQL.UseUnicode=False')
TUniQuery with default options.

If anyone is up for TeamViewer session to debug it, let me know.

P.s. Still using ZSqlProcessor as didnt found equal what could be used from UniDAC.

Best regards,
[email protected]

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Delphi XE4 with UniDAC getting Access violation error

Post by DemetrionQ » Tue 10 Sep 2013 09:36

Hello.

Please send a sample demonstrating the problem and the scripts for creating and filling the tables to dmitryk*devart*com .

Goaul
Posts: 4
Joined: Mon 02 Sep 2013 19:07

Re: Delphi XE4 with UniDAC getting Access violation error

Post by Goaul » Wed 11 Sep 2013 07:21

sent 18h ago.

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Delphi XE4 with UniDAC getting Access violation error

Post by DemetrionQ » Wed 11 Sep 2013 11:56

The point is that you are using the TZSQLProcessor component, which TZSQLProcessor.Connection property has the Nil value. As a result, an attempt to execute the following code:

Code: Select all

  ZSQLProcessor.Connection.StartTransaction;
raises Access Violation.

To solve the issue, do the following edits in your project:
  - replace TZSQLProcessor with TUniScript;
  - instead of the TZSQLProcessor.Script property use the TUniScript.SQL property;
  - make sure that the TUniScript.Connection property points to a configured TUniConnection component.

Goaul
Posts: 4
Joined: Mon 02 Sep 2013 19:07

Re: Delphi XE4 with UniDAC getting Access violation error

Post by Goaul » Wed 11 Sep 2013 13:46

thank you, works fine :)

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Delphi XE4 with UniDAC getting Access violation error

Post by DemetrionQ » Wed 11 Sep 2013 14:21

If any other questions come up, please contact us.

Post Reply