Subject | Firebird 1.5 RC7 and RC8 error using FB .NET provider and Delphi 8 |
---|---|
Author | Tony Rivron |
Post date | 2004-01-26T09:16:22Z |
I am trying to do the following in Delphi 8 with the latest
FIREBIRD-NET-PROVIDER.
var
AList : ListItemCollection;
sCon,sSQL : string;
connection : FBConnection;
transaction : FBTransaction;
command : FBCommand;
reader : FbDataReader;
begin
AList := ListItemCollection.Create;
sCon :=
'Database=localhost:C:\Data\OMS\OMSData.GDB;User=SYSDBA;Password=masterk
ey;Dialect=3;Server=localhost';
connection := FBConnection.Create(sCon);
connection.Open;
sSQL := 'SELECT * FROM USERS';
command := FBCommand.Create(sSQL,connection);
reader := command.ExecuteReader();
while reader.read do
begin
AList.Add(ListItem.Create(reader['NAME'].ToString,reader['INITIALS'].ToS
tring));
end;
reader.close;
connection.Close;
ListBox1.DataSource := AList;
After the reader := command.ExecuteReader() stage, the reader is null.
(Note the SELECT command works fine in IBExpert and also with the
BorlandDataProvider components.)
I get the following error...
************** Exception Text **************
FirebirdSql.Data.Firebird.FbException: Dynamic SQL Error
SQL error code = -901
feature is not supported
---> FirebirdSql.Data.Firebird.Gds.GdsException: Exception of type
FirebirdSql.Data.Firebird.Gds.GdsException was thrown.
at FirebirdSql.Data.Firebird.Gds.GdsStatement.Prepare()
at FirebirdSql.Data.Firebird.FbCommand.InternalPrepare()
at FirebirdSql.Data.Firebird.FbCommand.ExecuteReader(CommandBehavior
behavior)
--- End of inner exception stack trace ---
at FirebirdSql.Data.Firebird.FbCommand.ExecuteReader(CommandBehavior
behavior)
at FirebirdSql.Data.Firebird.FbCommand.ExecuteReader()
at TestOne.TWinForm.btnTest_Click(Object sender, EventArgs e) in
C:\Program Files\Borland\BDS\2.0\projects\Firebird
Example\TestOne.pas:line 180
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Tony Rivron
Senior Software Developer
James Fisher Mimic Ltd
T: +44 (0)161 226 3378
F: +44 (0)161 226 3464
tony.rivron@... <mailto:tony.rivron@...>
www.wmeng.co.uk
--------------------------------------------
This e-mail, its content and any file attachments are confidential and
may be legally privileged. The information is intended only for the use
of the individual or entity to whom it is addressed. If you are not the
intended recipient or the employee or agent responsible for delivering
it to the intended recipient, please do not copy, disclose it to any
third party or use the contents or attachments in any way.
Please destroy it and notify us immediately either by using the reply
facility on your e-mail system, e-mail info@... If this message
is being transmitted over the Internet, be aware that it may be
intercepted by third parties.
The content of this message may contain personal views which are not the
views of James Fisher Mimic Ltd unless specifically stated.
--------------------------------------------
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
[Non-text portions of this message have been removed]
FIREBIRD-NET-PROVIDER.
var
AList : ListItemCollection;
sCon,sSQL : string;
connection : FBConnection;
transaction : FBTransaction;
command : FBCommand;
reader : FbDataReader;
begin
AList := ListItemCollection.Create;
sCon :=
'Database=localhost:C:\Data\OMS\OMSData.GDB;User=SYSDBA;Password=masterk
ey;Dialect=3;Server=localhost';
connection := FBConnection.Create(sCon);
connection.Open;
sSQL := 'SELECT * FROM USERS';
command := FBCommand.Create(sSQL,connection);
reader := command.ExecuteReader();
while reader.read do
begin
AList.Add(ListItem.Create(reader['NAME'].ToString,reader['INITIALS'].ToS
tring));
end;
reader.close;
connection.Close;
ListBox1.DataSource := AList;
After the reader := command.ExecuteReader() stage, the reader is null.
(Note the SELECT command works fine in IBExpert and also with the
BorlandDataProvider components.)
I get the following error...
************** Exception Text **************
FirebirdSql.Data.Firebird.FbException: Dynamic SQL Error
SQL error code = -901
feature is not supported
---> FirebirdSql.Data.Firebird.Gds.GdsException: Exception of type
FirebirdSql.Data.Firebird.Gds.GdsException was thrown.
at FirebirdSql.Data.Firebird.Gds.GdsStatement.Prepare()
at FirebirdSql.Data.Firebird.FbCommand.InternalPrepare()
at FirebirdSql.Data.Firebird.FbCommand.ExecuteReader(CommandBehavior
behavior)
--- End of inner exception stack trace ---
at FirebirdSql.Data.Firebird.FbCommand.ExecuteReader(CommandBehavior
behavior)
at FirebirdSql.Data.Firebird.FbCommand.ExecuteReader()
at TestOne.TWinForm.btnTest_Click(Object sender, EventArgs e) in
C:\Program Files\Borland\BDS\2.0\projects\Firebird
Example\TestOne.pas:line 180
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Tony Rivron
Senior Software Developer
James Fisher Mimic Ltd
T: +44 (0)161 226 3378
F: +44 (0)161 226 3464
tony.rivron@... <mailto:tony.rivron@...>
www.wmeng.co.uk
--------------------------------------------
This e-mail, its content and any file attachments are confidential and
may be legally privileged. The information is intended only for the use
of the individual or entity to whom it is addressed. If you are not the
intended recipient or the employee or agent responsible for delivering
it to the intended recipient, please do not copy, disclose it to any
third party or use the contents or attachments in any way.
Please destroy it and notify us immediately either by using the reply
facility on your e-mail system, e-mail info@... If this message
is being transmitted over the Internet, be aware that it may be
intercepted by third parties.
The content of this message may contain personal views which are not the
views of James Fisher Mimic Ltd unless specifically stated.
--------------------------------------------
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
[Non-text portions of this message have been removed]