Page 1 of 1

Delphi XE4 with UniDAC getting Access violation error

Posted: Sat 07 Sep 2013 20:46
by Goaul
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]

Re: Delphi XE4 with UniDAC getting Access violation error

Posted: Tue 10 Sep 2013 09:36
by DemetrionQ
Hello.

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

Re: Delphi XE4 with UniDAC getting Access violation error

Posted: Wed 11 Sep 2013 07:21
by Goaul
sent 18h ago.

Re: Delphi XE4 with UniDAC getting Access violation error

Posted: Wed 11 Sep 2013 11:56
by DemetrionQ
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.

Re: Delphi XE4 with UniDAC getting Access violation error

Posted: Wed 11 Sep 2013 13:46
by Goaul
thank you, works fine :)

Re: Delphi XE4 with UniDAC getting Access violation error

Posted: Wed 11 Sep 2013 14:21
by DemetrionQ
If any other questions come up, please contact us.