Rich 

If you want to select records from 2 tables in 2 different databases across
2 servers all within a single SQL statement then you will have to do it via
Transact SQL (server.database.owner.table), because you will not be able to
do it via DSN's as you can only use one DSN at a time.  If you are only
selecting from a single database on one SQL server within each SQL query you
have then set up multiple DSN's to connect to each database you want to use
as others have suggested.




------------------------------------------------------------------ 
Andrew Ewings
Project Manager
Thoughtbubble Ltd 
http://www.thoughtbubble.net 
------------------------------------------------------------------ 
United Kingdom 
http://www.thoughtbubble.co.uk/ 
Tel: +44 (0) 20 7387 8890 
------------------------------------------------------------------ 
New Zealand 
http://www.thoughtbubble.co.nz/ 
Tel: +64 (0) 9 488 9131
------------------------------------------------------------------ 
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890. 



-----Original Message-----
From: Dylan Bromby [mailto:[EMAIL PROTECTED]]
Sent: 19 February 2001 17:52
To: CF-Talk
Subject: RE: Query Question


do you know how to set up a DSN? the only thing you'll do differently, is in
the CF admin console, use the server name of the second machine where the
database is kept.

queries are just the same. the fact that the database is on a second machine
(assuming it's networked somehow) is handled by the DSN. just use the
datasource name you give it when you write your query.

if i'm missing something that makes this more complex, let me know...


-----Original Message-----
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 19, 2001 8:49 AM
To: CF-Talk
Subject: RE: Query Question


Can you write me a sample query?
Rich

-----Original Message-----
From: Dylan Bromby [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 19, 2001 11:32 AM
To: CF-Talk
Subject: RE: Query Question


sure. you can make a DSN on machine 1 for a database on machine 2.

-----Original Message-----
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 19, 2001 8:31 AM
To: CF-Talk
Subject: Query Question


Is it possible to query a database on a different server?  What I mean is
can I have a template located at http://www.site1.com query a database
located at http://www.site2.com assuming I have the propper user id and
password?

Thanks,
Rich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to