Hi there
i need sample code to change ODBC of reports at runtime.
i have few clients using differnt DSN but sae set of ASP code, my all reorts have been designed in crystal8 and asp.
now ther are two ways, ither create differnt sets of reports for differnt user and on the basis of there login info load there reports or i cahnge the odbC on run time on the basis of there login info.
second scenario is helpful t me, as my customers will grow with the pessage of time, and also it is not easily maintainable if i use differnt version of same reports for differnt user.
thanking you in advance

11 Years
Discussion Span
Last Post by noman78

I dont know ur expertiese but slution is very simple
u have to add these lines in ADORecordSet.asp file.
this file comes with seagate 8 samples, and i m using this file.
here is the code sample
for i=1 to session("oRpt").Database.Tables.count
set crtable = session("oRpt").Database.Tables.Item(i)
crtable.SetLogonInfo session("ODBC")

session("ODBC") -->>> here i m passing ODBC name, session varriable contains the odbc name.
i hope it will help
other wise u can get back to me as well.
but one thing u need to remember, in seagate report, be sure from menu option Databse-->set location to remove the datase link.
i mean by default when u add a table into your report , it got information in set location like this --> dbname.tablename
from here u need to remove dbname. so it will read like tablename only.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.