How can I Insert data into my msaccess Database table

Hello all,

I am new to Java programming and I have problem that how can i insert name into my database table.

The code which i have written is following:

String filename = "d:/test.mdb";

String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";

database+= filename.trim() + ";DriverID=22;READONLY=true}";

Connection con = DriverManager.getConnection(database,"","");

String s = String.valueOf(text.getText());

int k =10;

Statement st = con.createStatement();

st.execute("create table Test123(name text)");

st.execute("INSERT INTO Test123 values" +s);

on the INSERT program throws exception?

can any one help me how to insert data into tabel.

Thanks

[759 byte] By [james_javaa] at [2007-11-26 22:30:57]
# 1
> he INSERT program throws exception?> can any one help me how to insert data into tabel.I have never used the jdbc driver to access, but what do you think that the flag READONLY=true means? An insert is not a read.Kaj
kajbja at 2007-7-10 11:36:10 > top of Java-index,Java Essentials,New To Java...