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!

Multiple ODBC data sources

Status
Not open for further replies.

Xerick

Programmer
May 28, 2003
1
0
0
CA
Hi,

I'm trying to use different ODBC drivers when using an SQL query.

E.g.
SQL SQLODBC
SELECT
...
END

By doing this, only the first ODBC data source is chosen.

Is there a command to chose the datasource you want to use.

Xerick
 
I'm new to WebFocus as well but I do know that we also wanted to access multiple datasources. We've found that we need to add code to a file that is created with the master. Someone more technical may be able to explain the reason why but I know this has worked for our shop.


For each master created a second file .acx is created in the same directory as the master. Open this file in notepad and add the SERVER= line to your code..... with your information.......

SEGNAME=GLACK ,
TABLENAME=AFS.GLACK,
SERVER=DBADEPT,
KEYS=0
,$

Hope this helps and if I've stated anything incorrectly maybe someone else will jump in and correct me.....
 
Try this in a fex when you sart a session or at any time in a focexec when you need it :

SQL SQLODBC SET USER ODBC1
SQL SQLODBC SET USER ODBC2
SQL SQLODBC SET USER ODBC3
-RUN;


where THE ODBC1/2/3 are DSNAMES implemented via Control Panel / Data Source(odbc) in Windows
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top