OleDB Alpha testers thread!

Forum related to OleDB access driver introduced since Zeos-7.3
Post Reply
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

OleDB Alpha testers thread!

Post by EgonHugeist »

Hello Zeos-comunity!

since new year 2015 i added a new Driver "OleDB"-Alfa-Version. This will be the topic thread for first testers to share first experiences.

To be clear:
The new driver simply is a native access driver for all Ole-Drivers. In addition Microsoft declared the OleDB as deprecated(year 2014) but OleDB was first choise until MS-SQL Server 2012. This driver bypasses the known "ADO" bridge!

Current performance tests are amazing! This new driver is imbelievable faster then ADO or the TDS protocol.
To get connected: use it like ADO. For the TZConnection users: click the button on the Database property editor and the "known" OleDB connection-string builder dialog will open.

known issues until 31.12.2014:
-a IZCallableStatement is missing -> TZStoredProcedure is not supported yet! So let's fix it.
-weired issues with more than one Connection and different TransactionIsolationLevels.. Did i overlook something? Feel free to help!
Edit: The MSOLEDB-Provider is cloning the Connections silently in background. Something i miss here. but i can find it yet.

Second Edit: fast lob reading is introduced. It depends on chunked reads. Increase 'Chunk_size=x' in bytes(defult 4KB/chunk) for faster reading!

Stay tuned! Happy new Year! Please help!
Feel free to attach performance results!
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Alfa000
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 05.12.2012, 09:09

Re: OleDB Alpha testers thread!

Post by Alfa000 »

Hello. In metod TZOleDBResultSet.GetString(ColumnIndex: Integer) you have missing this line:

Code: Select all

begin
	Result := ''; //This line is missing in r3591
	if not (IsNull(ColumnIndex)) then
	begin
		...
		...
	end;
end;
If returned field is null, then result is undefined!

Same problem is in some next methods (and maybe more):
TZOleDBResultSet.GetAnsiString
TZOleDBResultSet.GetUTF8String
TZOleDBResultSet.GetRawByteString
Daniel Andrascik
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: OleDB Alpha testers thread!

Post by EgonHugeist »

Done! R3592 /testing-7.2

You are right the values haven't been initialized if Result is NULL.
Thanks for the feedback
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Alfa000
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 05.12.2012, 09:09

Re: OleDB Alpha testers thread!

Post by Alfa000 »

I can't download last SVN revision because is not available on the sf.net today. Bu i found next issue.

Code: Select all

var
  u: TZURL;
  con: IZConnection;
  stat: IZStatement;
  RS: IZResultSet;
  SQL: string;
begin
  u := TZURL.Create;
  u.Protocol := 'OleDB';
  u.Database := 'Provider=SQLNCLI11.1;Trusted_Connection=yes;Encrypt=yes;Persist Security Info=True;Server=...';

  con :=  DriverManager.GetConnection(u.URL);

  stat := con.CreateStatement;
  SQL :=
    'CREATE TABLE "Test" ('+
	  '"Id" INT IDENTITY(1,1) PRIMARY KEY,'+
    '"Int_value" INT NOT NULL)';
  stat.Execute(SQL);
  SQL :=
    'INSERT INTO "Test" ("Int_value") VALUES (10)';
  stat.Execute(SQL);
  SQL :=
    'SELECT'+
      '"ID", '+
      '"Int_value" '+
    'FROM Test';
  RS := stat.ExecuteQuery(SQL);
  Assert(Assigned(RS));
  Assert(RS.Next);
  Assert(RS.GetInt(2)=10);
  SQL :=
    'SELECT'+
      '"ID", '+
      '"Int_value", '+
      '"Some_mistake_fild_name" '+ //purpose mistake for testing case
    'FROM Test';
  RS := stat.ExecuteQuery(SQL);
  Assert(Assigned(RS)); ----> this assertions fails!
  Assert(RS.Next);
If i execute select with non existing field, no error occours, no info is returned, but resulset is not assigned too of course.
Daniel Andrascik
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: OleDB Alpha testers thread!

Post by EgonHugeist »

Had no time for OleDB last days. Hope i can check it @weekend..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: OleDB Alpha testers thread!

Post by EgonHugeist »

Hi,

inbetween the issue should have been resolved. As i wrote Ole doesn't return the lob-attribute for the column, just a imbelievable huge col-size.
However i can use the VARxxxx(MAX) fields now. Same on ODBC
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply