I have a requirement to connect to Access Database and execute query and with the Resultset create a table in another database(MDB). Each query resultset should be populated to appropriate tables in the .MDB.
I do not know how I can create and populate a table from the resultset.Can somebody help me?
As for your specific problem, you cannot usually convert the a result set directly into input to a new query, you have to break it up into multiple steps. First, perform the query, then read the results and save them in some container class or hash map. Then, construct a new set of queries based on your stored data including a single table creation statement, and execute these queries as insert statements.
Just checking, to me MDB means message driven bean but thats because I haven't used access databases in ages.
You can break it up into separate steps and do a batch import. Store the retrieved data in an array of some container class, than use the container class to build a set of import statement (or one giant batch import).
If you're are looking for some auto-magical solution that will do all this for you, you'd need a more advanced technology like JDO. In JDBC everything is done via direct SQL or possibly with the help of stored procedures. [ January 04, 2006: Message edited by: Scott Selikoff ]
If you have access to Access and both MDB files, use import/link to add a symbolic link to one of the tables in the other database. You can then use a simple SQL to accomplish the task in the MDB that contains both the tables:
Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>