Skip to Content
0
Former Member
Apr 04, 2014 at 12:28 AM

ConnectionInfo using 'COM Connectivity' in C#

71 Views

I need to connect to a DLL using 'COM Connectivity" and a function to provide data for my crystal report in c#,

I have one report that gets populated via a database:

// DATABASE via ODBC-DSN

TableLogOnInfo tblLoginInfo = tbl.LogOnInfo;

tblLoginInfo.ConnectionInfo.ServerName = dsn;

blLoginInfo.ConnectionInfo.UserID = username;

tblLoginInfo.ConnectionInfo.Password = pw;

tbl.ApplyLogOnInfo(tblLoginInfo);

tbl.Location = db + "." + tbl.Name;

// this works great

I have another crystal report that is populated by COM Connectivity

// COM

TableLogOnInfo tblLoginInfo = tbl.LogOnInfo;

tblLoginInfo.ConnectionInfo.ServerName = "myclassname";

tblLoginInfo.ConnectionInfo.Type = ConnectionInfoType.CRQE;

// tbl.Location = ??

// this doesn't work. The report generated is empty/corrupted, but it gives no error

Thank you for your help,

Tammy