This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Is there a secret command to use when inserting a record into a database from a html form? I have been working on JDBC2 from the cattle drive, and for some reason I can't get all of data from my form into the table in the database. There are 3 types of input fields, and they are working properly because I can print out the user input to teh web page, but for some reason only the input from the text fields and radio buttons are being inserted into the database. My table is set up with 6 columns. The 4 that work are varchar() of different lengths. The 2 that don't work are char(1). I tried changing them to varchar(). Didn't work. I'm using statement.update( "INSERT INTO MYTABLE VALUES ( '"+variable1+"' , '"+variable2+"' , etc))" The syntax is the same for all 6 columns, and all 6 columns are being passed an appropriate value, but mysql can't seem to insert the whole row into the table. HELP!!! I'm starting to obsess over this!
Blake Minghelli
Ranch Hand
Joined: Sep 13, 2002
Posts: 331
posted
0
Can you show more of your code? Are you getting a SQLException on the INSERT or are just ending up with null values in some of your db fields?
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"