Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC and SQL Server 2000

Status
Not open for further replies.

delu0007

Programmer
Aug 28, 2001
26
US
I am trying to create CR8 reports that run off of SQL Server 2000 databases using an ODBC DSN. The reports are to be viewed through both a VB Application and an ASP Project. It works in the Crystal Reports Environment, and can be displayed in the VB Application (I haven't tried in the ASP project yet), but I can't seem to change the DSN that the report is connecting to.

I dynamically create a dsn connection using the SQLConfigDataSource API function and attempt to use this for the report by calling
Code:
SetLogOnInfo(DSNName, DatabaseName, User, Pwd)
for each table in the report (and sub report).

The report displays without any error messages, but the data displayed is still the original data that the report was written with. If I go back into the Crystal Report Environment and "Set Location" to the newly created DSN, the report displays the new data correctly.

Is there a problem with my call to SetLogOnInfo? Do I need to call an additional function, or set a certain parameter? I have created the DSN using a trusted connection (in the future I will support both trusted and non-trusted).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top