Switching DB (Sql to Oracle)
Posted: Tue Aug 14, 2007 12:35 pm
Hi,
I develop reports against SQL database (sql express). I use OLDB provider for SQL, (here is the connection string, "Provider=SQLOLEDB.1;Password=xyz;Persist Security Info=True;User ID=sa;Initial Catalog=Database1;Data Source=SERVER1") to design the reports but at run time, it may be required to produce reports against oracle datbase (it has the same schemas as that of SQL db).
Here is the code I use to do this, but I always get a blank report (no error and no data)...
Can someone please help me how to do this?
Thanks!!!
I develop reports against SQL database (sql express). I use OLDB provider for SQL, (here is the connection string, "Provider=SQLOLEDB.1;Password=xyz;Persist Security Info=True;User ID=sa;Initial Catalog=Database1;Data Source=SERVER1") to design the reports but at run time, it may be required to produce reports against oracle datbase (it has the same schemas as that of SQL db).
Here is the code I use to do this, but I always get a blank report (no error and no data)...
Code: Select all
string name = stiReport1.Dictionary.Databases [0].Name;
stiReport1.Dictionary.Databases.Clear();
string connectionString = "Provider=OraOLEDB.Oracle.1;Data Source=ORCL_DEVORCL;Password=xyz;User ID=USER1";
stiReport1.Dictionary.Databases.Add(new StiOleDbDatabase(name,connectionString));
stiReport1.Dictionary.Synchronize();
Thanks!!!