on 06-16-2015 7:12 PM
I have C# application using what I believe is the latest CR assemblies (13.0.2000.0) to connect to an Informix database via ODBC. Works fine. But, I need to bypass ODBC and connect the report directly to the Informix database.
Tables tables = _reportDocument.Database.Tables;
ConnectionInfo connectionInfo = new ConnectionInfo();
foreach (Table table in tables)
{
TableLogOnInfo tableLogOnInfo = new TableLogOnInfo();
tableLogOnInfo = table.LogOnInfo;
connectionInfo.ServerName = "InformixOdbcName";
connectionInfo.DatabaseName = "ProdDbName";
connectionInfo.UserID = "UserId";
connectionInfo.Password = "Password";
// Now the update ConnectionInfo in the object
tableLogOnInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogOnInfo);
}
The above works fine with ODBC and the appropriate values. But, when trying to set the ServerName directly to Informix: <host>@<servername>, the logon always fails. Can anyone provide some help on how to connect directly to Informix?
Why can't you use ODBC?
OLE DB would connect to the Server by name or IP and would not need a DSN defined before using your app.
Need more info on why?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your connection info just replace the DSN name with the server name.
Search this forum for logon database. Lot's of example code snippets.
If you want to replace the connection at runtime then search for ReplaceConnection and you'll find code also as well as an application that will generate the code to use for you.
Don
Hi John
By "connect directly" do you mean OLE DB? CR does not have a native connection DLL for Informix, so the only options would be ODBC or OLE DB.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.