opening table

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
uffek
Posts: 37
Joined: Fri 14 Nov 2014 21:49
Location: Roskilde, DK

opening table

Post by uffek » Mon 09 Oct 2017 11:41

I am doing a very simple opening of a table, which fails with message OCI_NO_DATA. Querying the same table is OK. I am on Delphi 10.1, update 2 and it has been tested with both win32 and win64. UniDAC 7.0.1.

Code: Select all

const
  tablename = 'LINK';
var
  Con: TUniConnection;
  qry: TUniQuery;
  tbl: TUniTable;
begin
  Con:= TUniConnection.Create(nil);
  Con.ProviderName := 'Oracle';
  Con.SpecificOptions.Add('Direct=True');
  Con.Server := 'DELL-2:1521:XE';
  Con.Username := 'xxxx';
  Con.Password := 'xxxxxx';
  Con.Database := 'XE';
  Con.LoginPrompt := False;
  Con.Open;

  qry:= TUniQuery.Create(nil);
  qry.Connection:= con;
  qry.SQL.Add('select * from sys.all_tables where table_name='+chr(39)+tablename+chr(39));
  qry.open;
  if qry.RecordCount=0 then
    raise exception.Create('Table '+tablename+' not found in database');
  qry.close;
  qry.Free;

  tbl:= TUniTable.Create(nil);
  tbl.TableName:= tablename;
  tbl.Connection := con;
  tbl.Open;
I can access the same table through several other applications.
Any idea?

uffek
Posts: 37
Joined: Fri 14 Nov 2014 21:49
Location: Roskilde, DK

Re: opening table

Post by uffek » Mon 09 Oct 2017 12:11

fixed by upgrading to 7.1.4

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: opening table

Post by MaximG » Thu 12 Oct 2017 12:13

We are glad that you found a necessary solution. Please don't hesitate to contact us with questions concerning ODAC usage

Post Reply