Hi,
I just tried UniDAC (demo) for a first test and when executing the query with a TUniQuery component:
update BSGLOBAL set DATA = :PDATA where NAME = :PNAME
I get the following error:
EAccessViolation at 0069d301 DBTest.exe DBAccess TDAParam.GetIsNull 0069d301 DBTest.exe DBAccess TDAParam.GetIsNull
Access violation at address 0069D301 in module 'DBTest.exe'. Read of address 00000000
0069d301 DBTest.exe DBAccess TDAParam.GetIsNull
0055999e DBTest.exe TestFramework 1207 TTestResult.RunTestRun
7c91eaf5 ntdll.dll KiUserExceptionDispatcher
006ac608 DBTest.exe DBAccess TCustomDASQL.AssignParamValue
006d3d3e DBTest.exe Uni TUniSQL.WriteParams
0069ec19 DBTest.exe DBAccess TCustomDADataSet.Execute
Database is Firebird.
Any idea what goes wrong? Since I have the demo version only, I cannot debug it myself.
cu Christian
Error with Trial
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
-
- Posts: 82
- Joined: Sat 01 Jul 2006 11:42
I tried to isolate the problem in a test application. But there it works fine. I'll probably buy UniDAC anyway, then I have the source and can find it.Challenger wrote:We couldn't reproduce this error using information you have specified. Please send to UniDAC support address complete sample that demonstrates this problem and include script to create server objects.
What I do is this:
try
qry := TUniQuery.Create(nil);
qry.Connection := FConnection;
qry.SQL.Text := 'update BSGLOBAL set DATA = :PDATA where NAME = :PNAME';
qry.Prepared := True;
qry.Params[0].DataType := ftMemo;
qry.Params[0].Value := '01.00';
qry.Params[1].DataType := ftString;
qry.Params[1].Value := 'BSDB_DDL_VERSION_APPLICATION';
qry.Execute;
finally
qry.Free;
end;
The difference is in the data of the TParam's object for the memo field:
This is the content of the TParam when I have the error:
($15DE890, 0, $33B74F8, '', '01.00', 0, 0, False, 'PDATA', ftMemo, True, ptUnknown, 0, nil, False)
This is the content when it works fine (code above):
($11B6908, 0, $1128418, '', Unassigned, 0, 0, True, 'PDATA', ftMemo, True, ptUnknown, 0, $11B6A70, False)
So somehow this object is not initialized the same way, but I don't see the difference right now.
cu Christian
-
- Posts: 82
- Joined: Sat 01 Jul 2006 11:42
Finally I purchased UniDAC and could debug the problem. What I did is, that I referred the param object as TParam instead of TUniParam. Then setting the DataType property does not call the correct method:Challenger wrote:We couldn't reproduce this error using information you have specified. Please send to UniDAC support address complete sample that demonstrates this problem and include script to create server objects.
var
param : TParam; // <<-- to solve the problem I have to use TUniParam here
begin
param := FUniQuery.Params.ParamByName('MEMOFIELD');
param.DataType := ftMemo; // <<-- here is the problem because like this, the blob object (FParamObject) is not created
FUniQuery.Execute;
end;
So my problems are solved for now and I look forward to see performance increase compared to DBX drivers (and DBX implementation in Delphi 2007...).
cu Christian