I'll be shocked if you can get that to work across servers (unless you
configure SQL Server specifically for this function).  Across databases on
the same server, no problem.

-----Original Message-----
From: Nagai, Paul [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 25, 2000 12:46 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Can i use 2 datasources in one app?


It can work with SQL Server, too (if the databases are on the same server
... and possibly, even if they're not).

I'm working on a query that looks like this:

<cfquery name="MyQuery" datasource="MyDatasource">
SELECT *
FROM    Table INNER JOIN servername.databasename.dbo.table2 
        ON Table.field1 = servername.databasename.dbo.table2.field2
</cfquery>
------
Paul Nagai

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 25, 2000 6:41 AM
To: [EMAIL PROTECTED]
Subject: RE: Can i use 2 datasources in one app?


Caveat: I've only heard of this working with Access databases.  And
"AnyValidDSN" must also be an Access DB.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 25, 2000 5:32 AM
To: [EMAIL PROTECTED]
Subject: RE: Can i use 2 datasources in one app?


> >     Quick question.
> >     Can I use 2 different datasources in a CF page?

You CAN actually use multiple sources of data in the very same CFQUERY, but
only one can 
be an "official" CF datasource:

<CFQUERY NAME="GrabDataFromMultipleSources" DATASOURCE="AnyValidDSN">
        SELECT a.*, b.*
        FROM TableInDSN a,
"c:\inetpub\wwwroot\database\anyotherdb.mdb".Table b
</CFQUERY>

The syntax to define a table from an undefined datasource is:
"fullfilepath".Table

This method may also be useful for people whose sites are hosted by service
providers -- 
you can use a datasource even if it hasn't yet been officially set up as a
DSN...

Gene Kraybill
LPW & Associates
Mansfield, PA
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to