Hi, in my program i want to extract data from one table ( contains colums of different datatypes ) and insert that into another table. I want my program to be so generic so that i need to just pass the source table and the destination table is it is possible to so.... and if so pls. let me know how to do that...
Well, if your RDBMS is SQL Server I'd always say looks at DTS before starting to write your own version of it.
That being said, you have a number of routes to possibly try. JDBC has the javax.sql.DatabaseMetaData interface, full of useful methods to discover information about a database object. Alternatively you might consider an ORM technology, such as Hibernate, which removes some of the nuts-and-bolts programming.
as i'am new to the use of "DatabaseMetaData" i don't know how to proceed with that can you give me s very small example of how to use the above interface in an effective way....
waiting for your reply.....
Joined: Sep 19, 2005
Hi, I got some knowledge about the Interface "DatabaseMetaData" ( tried with small programs)
Now let me tell the exact need
There are two database ( let's name it "DB1" & "DB2") with the same structure . Database base "DB1" have data of resources ( lets name it "R1","R2","R3") and "DB2" is empty now i need to copy the data which is related to resource "R2" alone to the database "DB2".
Upto what level does the interface "DatabaseMetaData" support this and is there any other better option to do this