Thread View: borland.public.delphi.database.dotnet
1 messages
1 total messages
Started by nostradumbass77
Wed, 16 Apr 2008 10:05
Using Firebird .NET provider
Author: nostradumbass77
Date: Wed, 16 Apr 2008 10:05
Date: Wed, 16 Apr 2008 10:05
43 lines
2570 bytes
2570 bytes
Please can someone post a link(s) to example programs developed
(BDS2006) using this?
I need to get a database app developed using Firebird and C# Builder
for .NET and don't know how to get a DataSet populated with data.
Here's my code:
FbConnection cn = new FbConnection();
FbCommand cmd= new FbCommand();
DataSet ds = new DataSet();
FbConnectionStringBuilder cs = new FbConnectionStringBuilder();
cs.DataSource = "localhost";
cs.UserID = "SYSDBA";
cs.Password = "masterkey";
cs.Database = "D:\\firebirddata\\TESTINGDB.db";
cs.Port = 3050;
cs.Charset = "UNICODE_FSS";
cs.Pooling = true;
cs.ConnectionLifeTime = 30;
// To use the embedded server set the ServerType to 1
cs.ServerType = 0;
cn.ConnectionString=cs.ConnectionString ;
cn.Open();
cmd.Connection=cn;
cmd.CommandType= CommandType.StoredProcedure;
cmd.CommandText ="EMPLOYEE_S"; //this is a SELECT stored
procedure
try{
ds = cmd.ExecuteReader(); // <----- I get
an error
message here
} catch(Exception ex) {
MessageBox.Show("Error" + ex.ToString() );
}
How do I populate the DataSet with data ???
Many thanks,
ND
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads