Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@www.apache.org Received: (qmail 86803 invoked from network); 13 Mar 2004 15:47:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Mar 2004 15:47:56 -0000 Received: (qmail 76289 invoked by uid 500); 13 Mar 2004 15:47:34 -0000 Delivered-To: apmail-jakarta-struts-user-archive@jakarta.apache.org Received: (qmail 76264 invoked by uid 500); 13 Mar 2004 15:47:33 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 76249 invoked from network); 13 Mar 2004 15:47:33 -0000 Received: from unknown (HELO hotmail.com) (64.4.46.87) by daedalus.apache.org with SMTP; 13 Mar 2004 15:47:33 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 13 Mar 2004 07:47:35 -0800 Received: from 61.11.17.107 by bay9-dav30.bay9.hotmail.com with DAV; Sat, 13 Mar 2004 15:47:35 +0000 X-Originating-IP: [61.11.17.107] X-Originating-Email: [verifyurcontact@hotmail.com] X-Sender: verifyurcontact@hotmail.com From: "Verify" To: "Struts Users Mailing List" References: Subject: Re: Multiple databases in 1 Query Date: Mon, 9 Feb 2004 21:02:02 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: X-OriginalArrivalTime: 13 Mar 2004 15:47:35.0812 (UTC) FILETIME=[81646C40:01C40912] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks for the response. Actually running queries from the sql prompt is not the problem with me. "What I want is to execute this query(using Multiple databases) through some Action class. I am using MySQL" Say : Connection conn = null; Statement stmt = null; ResultSet rs = null; DataSource dataSource = null; dataSource = getDataSource(request); conn = dataSource.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(sqlchkvalidity); Here when I say dataSource = getDataSource(request); conn = dataSource.getConnection(); I always get connection to a single Database, according to the Datasource specified. But the query has to use multiple databases. So what do I do ????? I am sorry If u r not able to understand my problem. Thanks in advance for paying attention to my problem. Regards, Nilesh. ----- Original Message ----- From: "Verify" To: "Struts Users Mailing List" Sent: Friday, February 06, 2004 11:30 AM Subject: Multiple databases in 1 Query In my struts application I need two databases. I have used DBCP and defined the datasources. I am able to use both the databases. But I want to execute some query which will require tables from both the databases.(Union). Is it possible? If so how can I do it. I kno that this is more of a database concept issue than a Struts issue, but please help me. Any comments and suggestions are welcome. Thanks in advance for paying attention to my problem. Regards, Nilesh. --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org