craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > QuickTable Installation Issues Post New Topic   Post A Reply
database connection using odbc printer friendly version
next newest post | next oldest post
Author Messages
liezl
Private

Gender: Female
Location:
Registered: Sep 2005
Status: Offline
Posts: 2

Click here to see the profile for liezl Send email to liezl Send private message to liezl Find more posts by liezl Edit or delete this message Reply w/Quote
Posted Thursday, September 15, 2005 @ 00:28:03    YIM

hello. i hv an error when i connect to the database. this is my code.

this.add(dbTable1);
dbTable1.setDatabaseDriver("sun.jdbc.odbc.JdbcOdbcDriver");
dbTable1.setJdbcUrl("jdbc:odbc:dbRegiSystem");
dbTable1.setSelectSql("SELECT id, name, pass, stat FROM tbluser");
dbTable1.createControlPanel();

dbTable1.addUpdateSql("UPDATE tbluser SET name = ?, pass = ?, stat = ? WHERE id = ?", "2 , 3, 4, 1");
dbTable1.addInsertSql("INSERT INTO tbluser (id, name, pass, stat) VALUES (?,?,?,?)", "1,2,3,4");
dbTable1.addDeleteSql("DELETE tbluser WHERE id = ?", "1");

try
{
dbTable1.connectDatabase();
dbTable1.refresh();
}

catch (SQLException ex)
{
System.out.println(ex.getMessage());
ex.printStackTrace();
}

dbTable1.setEditable(true);
dbTable1.enableExcelCopyPaste();

The code is not working. can anyone help me to solve this.

thanks in advance.... :)

--------------------

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Thursday, September 15, 2005 @ 08:45:28  

what is the error? send all the exceptions in the command window.
Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios