hi, i been trying to get my code working, can anyone help me?? i just need to complete the insert from my sybase server to my oracle server, i have setup my sybase tables already which are
id, fName, lName, title, salary
im trying to pass my tables to Oracle, which one would be better ResultSet.getString or ResultSet.getMetaData()... either way im stuck... i'm trying to do it generically
i used system.out.println so tell me if i was getting something i am... im getting column by column... is there a way just get the entire table and just plug it into Oracle
can anyone helpme comple this darn code...

thanx alot for your input i really appreciate it...

import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Connection;
import java.io.*;
import oracle.jdbc.driver.OracleConnection;
import com.sybase.jdbcx.*;
import com.sybase.jdbc3.tds.*;
import com.sybase.jdbc3.jdbc.*;
import com.sybase.jdbc3.timedio.*;
import com.sybase.jdbc3.utils.*;
import java.util.*;

public class SybaseConnector {

Connection m_Connection = null;
Statement m_Statement = null;
ResultSet m_ResultSet = null;

Connection s_Connection = null;
Statement s_Statement = null;
ResultSet s_ResultSet = null;

String m_Driver = "oracle.jdbc.driver.OracleDriver";
String m_Url = "jdbcracle:thin:@w2vz2dtt02:1521:Test";
String s_Driver = "com.sybase.jdbc3.jdbc.SybDataSource";
String s_Url = "jdbc:sybase:Tds:";
public SybaseConnector() {

//Load driver
try {
System.out.println("Driver for Oracle loaded Successfully");
System.out.println("Driver for Sybase loaded Successfully");
catch (ClassNotFoundException ex) {
System.out.println("Oracle Driver was not loaded successfully");
System.out.println("Sybase Driver was not loaded successfully");

public void doWork() {

String query = "";
//String execute = "";
//String create = "";
try {
//Create connection object
m_Connection = DriverManager.getConnection(m_Url, "system", "e9876");
System.out.println("Connected to Oracle Successfully");
s_Connection = DriverManager.getConnection(s_Url, "sa", "");
System.out.println("Connected to Sybase Successfully");

//Create Statement object
s_Statement = s_Connection.createStatement();
query = "SELECT * FROM employee";

//Execute the query
s_ResultSet = s_Statement.executeQuery(query);

//Loop through the results
while (s_ResultSet.next()) {
System.out.print(s_ResultSet.getString(1) + " " + s_ResultSet.getString(2) + " " + s_ResultSet.getString(3) + " " + s_ResultSet.getString(4) + " " + s_ResultSet.getString(5)+"\n");
catch (SQLException ex) {
finally {

try {
if (m_ResultSet != null)
if (m_Statement != null)
if (m_Connection != null)
catch (SQLException ex) {

public static void main(String[] args) {
SybaseConnector Test = new SybaseConnector();