Hi,

i hava a problem when inserting a row in a mysql-table
from a java-program. Database and table exists !
Platform: Windows 2000.


String url = "jdbc:mysql:///javas"; // javas is the database
String sqlQuery1 = "Insert into customer values (" + name + "," + ssNo + "," + address + "," + phone +")";

System.out.println("sqlQuery : " + sqlQuery1); // shows //the sql-command correctly
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection aConnection =
DriverManager.getConnection(url, "root", "");

Statement aStatement = aConnection.createStatement();
aStatement.executeUpdate(sqlQuery1);
.....
}
catch (SQLException e)
{
while (e != null)
{
System.out.println("SQLExeption caught " +e);
e = e.getNextException();
}
}

I can compile the program, but when executing i get
the message:
Column not found, message from server:
"Unknown column 'fgg' in 'field list'"
where fgg is the attribute of the field called name and not
a field of the table !

when i use:
String sqlQuery1 = "Insert into customer values ("a","b","
c","d")" it works (but I wan't to get the field-attribute from
a formular).

Whats wrong ? Thanks for any help.

Chris