Page 1 of 1

UniTable 5.2.5 D7 on SQLServer: Access violation when instering records

Posted: Wed 19 Feb 2014 07:52
by Rahalph
Hello everybody,
I've updated from UniDac 3.xx to 5.2.5 with source code for Delphi7. Deinstallation and Installation worked well. After recompiling

my application I got multiple access violations when posting records. I broke down the problem in a seperated test app as follows:

UniConnection1.Connect;

UniTable1.FieldDefs.Add ('ID', ftAutoInc, 0);
UniTable1.FieldDefs.Add ('AnyValue', ftInteger, 0);

UniTable1.Open;
UniTable1.Append;
UniTable1AnyValue.Value:= 42;
UniTable1.Post; <- access violation here!!!

To give you an impression of the component's properties, here the interesting part of the dfm:

object SQLServerUniProvider1: TSQLServerUniProvider
Left = 72
Top = 32
end
object UniConnection1: TUniConnection
ProviderName = 'SQL Server'
Database = 'Test'
SpecificOptions.Strings = (
'SQL Server.Authentication=auWindows'
'SQL Server.OLEDBProvider=prNativeClient')
Server = '.\SQLEXPRESS'
Left = 72
Top = 88
end
object UniTable1: TUniTable
TableName = 'Test1'
Connection = UniConnection1
KeyFields = 'ID'
Left = 72
Top = 144
object UniTable1ID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
Required = True
end
object UniTable1AnyValue: TIntegerField
FieldName = 'AnyValue'
end
end

As you can see, everything is pretty basic. For the test app I created the database and the table using the management studio before

the app start.

WITHOUT adding the FieldDefs there is no problem!!! But because the structure of my main application I have several tables where I

have to fill the FieldDefs in one module, create the table in another module and open/append/post in a third one. Let's simply say: I

need it!

Does anybody know, how that bug can be fixed? Or does anybody have a workaround (except not adding FieldDefs!)?

Your help will be much appreciated! If there is a better place to post this topic, please let me know.

Thanks
Ralph

Re: UniTable 5.2.5 D7 on SQLServer: Access violation when instering records

Posted: Wed 19 Feb 2014 16:14
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next UniDAC build.

Re: UniTable 5.2.5 D7 on SQLServer: Access violation when instering records

Posted: Wed 19 Feb 2014 16:22
by Rahalph
These are indeed great news! Thank you very much!

Re: UniTable 5.2.5 D7 on SQLServer: Access violation when instering records

Posted: Thu 20 Feb 2014 14:07
by Dimon
The new UniDAC build 5.2.6 is available for download now.

Re: UniTable 5.2.5 D7 on SQLServer: Access violation when instering records

Posted: Mon 24 Feb 2014 09:57
by Rahalph
Downloaded. Tested. Works well! Thank you!!

Problem solved and Thread closed.

Re: UniTable 5.2.5 D7 on SQLServer: Access violation when instering records

Posted: Mon 24 Feb 2014 12:55
by AlexP
Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.