Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #5
| From | ruds <rudranee@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.databases |
| Subject | Accessing 2 tables having same name but different databases ms-access |
| Date | 2011-04-25 03:45 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <38947d04-5131-4725-a2bf-a3bee316a814@q6g2000prl.googlegroups.com> (permalink) |
Hi,
I have an application with MS-Access as backend and JSP/ tomcat as
frontend/webserver.
For getting better response time(as access is very slow compared to
other RDBMS's), I have split the main DB into two DB's on different
disks on my server for better performance.I have kept the table names
same but changed the DB names. How do I access tables from both the
DB's?
This is what I have done; I made different connection to the
respective DB's i.e. con and con2. When I want to access data, I am
using 2 result sets for retriving data from the tables, but getting no
result. Here is my code:
rs2_1=stmt2_1.executeQuery("select * from Requests where
Status='Released' AND LoginName='"+login+"' order by Req_No");
rs=stmt.executeQuery("select * from Requests where Status='Released'
AND LoginName='"+login+"' AND Req_No> 5500 order by Req_No");
So, rs & stmt are for latest records and rs2_1 & stmt2_1 correspond
the records from older DB.
I think, I'm forgetting some small thing but cant get it.
Please advice.
Back to comp.lang.java.databases | Next — Next in thread | Find similar
Accessing 2 tables having same name but different databases ms-access ruds <rudranee@gmail.com> - 2011-04-25 03:45 -0700 Re: Accessing 2 tables having same name but different databases ms-access Roedy Green <see_website@mindprod.com.invalid> - 2011-04-25 13:44 -0700
csiph-web