hi,
how can I use a command object in Report Begin render Event to read data from a database?
In this particular case, I do not want to use a data source but would like to do it using a command object
Thanks
read data from database using a command object
Re: read data from database using a command object
Hello.
Sorry, we don't understand your question. Could you describe your issue more detailed?
Could you specify what do you mean under "command object"?
Thank you.
Sorry, we don't understand your question. Could you describe your issue more detailed?
Could you specify what do you mean under "command object"?
Thank you.
Re: read data from database using a command object
I am interested in reading data directly from the database without using a data source as follows
In this , how can I actually read the data? How can I go through results of this data query?
thanks
Code: Select all
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(
((Stimulsoft.Report.Dictionary.StiSqlDatabase)this.Dictionary.Databases[0]).ConnectionString);
try {
conn.Open();
// Create table if it does not exist
System.Data.OleDb.OleDbCommand cmdCreate = conn.CreateCommand();
try {
cmdCreate.CommandText = @" Select Name from Project where Project =" + pProject;
cmdCreate.ExecuteNonQuery();
}
catch { } }
finally {
conn.Close();
}
thanks
Re: read data from database using a command object
Hello.
Could you specify how this question is connectied with our product?
If you need to add data connection to the report then read Stimulsoft Reports.Net FAQ.
Thank you.
Could you specify how this question is connectied with our product?
If you need to add data connection to the report then read Stimulsoft Reports.Net FAQ.
Thank you.
Re: read data from database using a command object
I am trying to do this on Begin rendering event
Re: read data from database using a command object
Hello.
Could you specify which version do you use?
Please, describe you issue more detailed.
What do you try to do? Why do you do this in Begin Render event?
Thank you.
Could you specify which version do you use?
Please, describe you issue more detailed.
What do you try to do? Why do you do this in Begin Render event?
Thank you.