Hi there
i need sample code to change ODBC of reports at runtime.
scenario:
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

i got solution myself, if any one needs let me know

can you tell me how you solved this issue? Thanks!

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")
next

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.