hi all,
please someone help me, i'm got stuck in a problem. i'm getting weird output. below is my code, and i'm getting output having blocks with data displayed in textboxes..
plz take a look and tell me what i'm doing wrong,
**db.java**
Code:
import java.sql.*;
class db
{
Statement st;
Connection con;
ResultSet rs;
public db()
{
connect();
}
public void connect()
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:data1";
con=DriverManager.getConnection(url);
st=con.createStatement();
String sql="select * from Table1";
rs=st.executeQuery(sql);
/*while(rs.next())
{
String name=rs.getString("fname");
String lname=rs.getString("lname");
System.out.println(name+" "+lname);
}*/
//con.close();
}
catch(Exception ex)
{
System.out.println(ex);
}
}
public static void main(String args[])
{
new db();
new GUI();
}
}
Looks like a problem with the character set. Is the data saved in the database in unicode format? Also check the language settings of the database and of the computer which is running the app.
.
I am not a complete idiot. Some parts are still missing. Check out the rtf-help tutorial General VB Faq Thread Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink! Get more power for your floppy disks. ; View honeybee's Elite Club: Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
And if that response was mine, please think about giving me a rep. I like to collect them!
Looks like a problem with the character set. Is the data saved in the database in unicode format? Also check the language settings of the database and of the computer which is running the app.
.
thanks for replying
i'm using MS Access 2010 and then i saved the table with 2003 format. I've set the datatype as text for all field, can you tell me if i'm wrong?
any help would be appreciated.
Can you try saving the table in 2010 format? Does 2003 support unicode?
.
I am not a complete idiot. Some parts are still missing. Check out the rtf-help tutorial General VB Faq Thread Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink! Get more power for your floppy disks. ; View honeybee's Elite Club: Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
And if that response was mine, please think about giving me a rep. I like to collect them!
I don't have Java installed in my PC right now. So, what I am posting is all just my assumptions.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India