From: Peter M. J. <pe...@tc...> - 2004-03-25 15:12:41
|
Hi! New guy here! Can someone please tell me how to use the FB 1.5.2 .NET Provider in a Delphi 8 VCL Forms App? I installed the FB 1.5.2 .NET Provider assembly and it's accessible in a Windows Forms App, but not in a VCL Forms app. Peter M. Jagielski Senior Software Engineer TCS Software, Inc. Columbus, Ohio tel: 614.451.5010 Pe...@TC... <http://www.associationsoftware.com/>www.AssociationSoftware.com Helping Associations Grow with Technology |
From: Peter M. J. <pe...@tc...> - 2004-03-26 14:15:49
|
Carlos, Thanks for responding. >> I can't help here, i don't use Delphi, are you sure that VCL forms application can use ADO.NET providers ?? Delphi 8 VCL Forms Apps, the best I can tell, can't use .NET components natively - one has to import them (so Delphi can create a wrapper) via the WinForm Control Import Wizard. I've done this, and 3 of the 4 FB 1.5.2 .NET Provider components (fbConnection, fbCommand, fbDataAdapter) appear in the Tool Palette - I don't know what happened to fbCommandBuilder. Anyway, although the 3 components appear in the Tool Palette, I can't do anything with them - I can't interact with them (such as dragging them to my form's workspace) like I can if I'm creating a native .NET WinForms app, where they work perfectly. No where that I can find in the Delphi docs does it state that the WinForm Control Import Wizard will import any and all .NET components, so perhaps this is a case where a failure can occur. I'd just like to be able to talk to someone who has gone through this process already and can confirm that it can or cannot work. We have a huge pre-Delphi 8 code base and we're not ready yet to do native Delphi 8 .NET WinForm apps, so it's imperative that we figure out how Delphi 8 VCL Forms App and Firebird 1.5 can work together. Thanks again Carlos! >Hello: > >>Can someone please tell me how to use the FB 1.5.2 .NET Provider in a >>Delphi 8 VCL Forms App? I installed the FB 1.5.2 .NET Provider assembly >>and it's accessible in a Windows Forms App, but not in a VCL Forms app. > >I can't help here, i don't use Delphi, are you sure that VCL forms >application can use ADO.NET providers ?? Peter M. Jagielski Senior Software Engineer TCS Software, Inc. Columbus, Ohio tel: 614.451.5010 Pe...@TC... <http://www.associationsoftware.com/>www.AssociationSoftware.com Helping Associations Grow with Technology |
From:
<car...@te...> - 2004-03-26 17:02:53
|
Hello: > No where that I can find in the Delphi docs does it state that the > WinForm Control Import Wizard will import any and all .NET components, > so perhaps this is a case where a failure can occur. Maybe the best will be to ask it in the Borland Delphi forums. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From:
<car...@te...> - 2004-03-26 13:37:00
|
Hello: > Can someone please tell me how to use the FB 1.5.2 .NET Provider in a > Delphi 8 VCL Forms App? I installed the FB 1.5.2 .NET Provider assembly > and it's accessible in a Windows Forms App, but not in a VCL Forms app. I can't help here, i don't use Delphi, are you sure that VCL forms application can use ADO.NET providers ?? -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Tobias G. <tob...@ca...> - 2004-04-07 12:15:53
|
Hello Peter, Using the FB .NET Provider with Delphis form designer is a mess... even in a winforms project you can't simply "click" a simple application together. Maybe that's not so bad, because it gives you the chance to write better code with a nice separated GUI ;) There are three ways of using the FB .NET Provider in Delphi with visual controls, I'm aware of: 1) Stick to WinForms... That's more or less the same as C#. 2) Use FbConnection / FbCommand / FbAdapter and fill your VCL Control, i.e. a TLixtBox by hand, using DataSet or DataReader. 3) Use FbConnection / FbCommand / FbAdapter and use TADONETConnector to connect a DataSet or DataTable to your data-aware VCL Controls like TDBGrid. A quick and dirty example for 3): On your form DBGrid1 is connected to DataSource1 and DataSource1 is connected to ADONETConnector1. Now you can do something like this: procedure TForm1.Button1Click(Sender: TObject); var Connection : FbConnection; Adapter : FbDataAdapter; empDataTable: DataTable; begin Connection := FbConnection.Create(FConnectionString); Connection.Open; try Adapter := FBDataAdapter.Create( 'SELECT EMP_NO, FIRST_NAME, LAST_NAME FROM employee', Connection); empDataTable := DataTable.Create('employee'); Adapter.Fill(empDataTable); ADoNetConnector1.DataTable := empDataTable; ADoNetConnector1.Active := True; finally Connection.Close; end; end; Tobias |