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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RAS & trusted connections

Status
Not open for further replies.
May 7, 2003
2
0
0
CA
It appears that RAS does not support the CR9 "trusted" connection type and that the ASP code would have to do the work of creating a connection, retrieving the recordset and passing the recordset to the report for display.

All of the examples folks have kindly posted include a username & password. This is not trusted. The ASP code would have to use the IIS connection information to create the connection. And probably read the report file to determine what the source was supposed to be to create the record set (?).

Does anyone have sample code for this?
Is there a way to handle parameters dynamically?

Looking for help
 
Here is ASP syntax for connecting to DB - Trusted connection and getting recordset out:

set DB = Server.CreateObject("ADODB.Connection")

strConn = "Provider=SQLOLEDB.1;Integrated Security=SSPI; Persist Security Info=False;Initial Catalog=PUT_NAME_OF YOUR_DB_HERE; Data Source = NAME_OF YOUR DATASOURCE"

Look to Set Location window in your report to get correct values for Initial Catalog (Database) and Data Source (Server Name)

DB.Open strConn

Set RS = Server.CreateObject("ADODB.Recordset")
SET RS = DB.Execute ("Select.....")

Or you can call a stored procedure to execute if that is your record source.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top