>----- Original Message -----
>From: Britney Spears
>Dawgs,
>
>In my application.cfm file I'm doing two queries on the same database
>just different tables. Is there an easier way using, lets say, CFQUERY
>DBTYPE=?
>
><cfquery name="setdata" datasource="#request.dsn_prefs#">
>SELECT *
>FROM tableData
>WHERE strLogin = '#SESSION.user#'
></cfquery>
>
><cfset session....
><cfset session....
>
><cfquery name="setref" datasource="#request.dsn_prefs#">
>SELECT *
>FROM tableref
></cfquery>
>
><cfset session....
><cfset session....________________________________
Try this.
<cfquery name="setdata" datasource="#request.dsn_prefs#">
SELECT *
FROM tableData
WHERE strLogin = '#SESSION.user#'
</cfquery>
<cfquery name="setref" datasource="#request.dsn_prefs#">
SELECT *
FROM otherDataBase..tableData
</cfquery>
As long as the username that you are logging in with to request.dsn_prefs
has access to the other DB this should work.
Notice the ".." between the database name and the table.
PS Just out of curiosity, why are you using Britney Spears as your email?
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- re: Using CFQUERY Britney Spears
- Re: Using CFQUERY Deanna Schneider
- Re: Using CFQUERY Britney Spears
- RE: Using CFQUERY Won Lee
- RE: Using CFQUERY Adkins, Randy
- RE: Using CFQUERY Won Lee
- Re: Using CFQUERY Ben Doom
- Re: Using CFQUERY Charlie Griefer
- RE: Using CFQUERY Tony Weeg
- Re: Using CFQUERY Ben Doom
- Re: Using CFQUERY William H Bowen
- RE: Using CFQUERY Tony Weeg
- Re: Using CFQUERY William H Bowen
- RE: Using CFQUERY Adkins, Randy