Page 1 of 1

Access violation when BLOB field

Posted: Wed 07 Jan 2009 16:28
by ReinhardOstermeier
Hi,
Everytime when I insert an entry with a blob field I get the Exception:
"Access violation at address 03176F23 in module 'dbexpoda40.dll'. Read of address 00000000"
The address is not fix, it depends on where the TSQLQuery.ExecSQL command is in my code.

Here is a code example:

Code: Select all

procedure TRemote.Button1Click(Sender: TObject);
var
  query : TSQLQuery;
begin
  query := TSQLQuery.Create(nil);

  query.SQLConnection := Paramserver.ServerDM.DB;
  Paramserver.ServerDM.DBConnect;

  query.SQL.Add('INSERT INTO blobtest');
  query.SQL.Add('(ID, blb) ');
  query.SQL.Add('VALUES(1, empty_blob()) ');
  query.SQL.Add('Returning blb INTO :blbdata');

  query.ParamByName('blbdata').ParamType := ptInput;
  query.ParamByName('blbdata').DataType := ftOraBlob;
  query.ParamByName('blbdata').LoadFromFile('E:\projekte\ascot\muc\sitzd09\tempcopie\ascot.ini', ftOraBlob);

  try
    query.ExecSQL();
  except
    on ex : Exception do
    begin
      MessageDlg(ex.Message, mtError, [mbOK], 0);
    end;
  end;
  query.Free();
end;
The funny thing is, that the entry is in the database and the blob field is correct. When I read the entry and write the blob to file again, then the data is ok.

Here are my connection params:

Code: Select all

DriverName=DevartOracle
GetDriverFunc=getSQLDriverORA
LibraryName=dbexpoda40.dll
VendorLib=oci.dll
Oracle TransIsolation=ReadCommited
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
Params are set at runtime

Oracle Server is 10.2.0.1.0 on WinXP Pro
Oracle Client is 10.2.0
dbexpoda40.dll 4.40.0.13
Delphi 2009 with Update 1 + 2 + Help 1
OS WinXP Pro SP3

The same code works with Delphi 7 and dbexpoda.dll 3.x

Would be nice if anyone could help me.

Regards,
Reinhard.

Posted: Fri 09 Jan 2009 09:31
by Plash
We have fixed this problem. The fix will be included in the next build of DbxOda.

Posted: Fri 09 Jan 2009 13:26
by ReinhardOstermeier
Is it safe to ignore the Access violation? or does it make any memory leaks or something like it?
And, can you tell me for when the next build is shedulled?
Thank you,
Reinhard.

Posted: Mon 12 Jan 2009 08:40
by Plash
The access violation occurs on committing the statement. If you ignore this access violation the changes are not committed until you execute the next statement or close the connection.

We are planning to release the next build of DbxOda this week.

Posted: Tue 11 Oct 2011 19:49
by pnsozko
when I run a qry that contains a type field interval, gives an error saying "Exception in module EAssertionFailed dbexpoda.dll at 00096F13". is very similar to the former. Is there any update to solve it?

Posted: Fri 14 Oct 2011 10:38
by AlexP
Hello,

Unfortunately, at the moment our dbExpress driver for Oracle does not support the Interval data types.
Support for these types may be added in the future.