Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Multiple ODBC - Please respond.

Multiple ODBC - Please respond.

Multiple ODBC - Please respond.


I have a report in 8.5 which when designed was connected to one ODBC name (ODBC_1). Except for the table name, I stripped off the databasename.dbo before the table name. I am able to see the results of the report. I pass a Patient ID and am able to see the report in the browser window.

My question now is as follows:

From my ASP page, I pass a parameter to the SetlongonInfo method in the following way:

stAlias catches the database name passed from the previous ASP page.

if stAlias = "Database1" then
    stODBC = "odbc1"
    stDatabase = "Database1"
elseif stAlias = "Database2" then
    stODBC = "odbc2"
    stDatabase = "Database2"
end if

userid = "sa"
password = ""
crtable.SetLogonInfo cstr(stODBC), cstr(stDatabase), cstr(userid), cstr(password)

Even though there are two different databases (databases with different names), the tables and the views are the same. Basically both the database have different data.

But when I designed the report, it was created off odbc1. How can I pass the ODBC and the database name as well so that I get to see the same report reflecting different data from two different databases.

What is it that I must do in the CR to strip off the ODBC name ?

Hope that I was clear in my explanation.

Regards, Padmaja.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close