• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert data into table

 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to some help, I now have my tables created. I'm now trying to load the data into the first table. I have a file that I'm the info from and trying to insert it in the table.

This is not working but I can't find any examples of what would work. I've found examples for insert literals but not variables.
Help!
[ edited to move code block to the left (to alleviate the pain of scrolling left-right) -ds ]
[ April 27, 2003: Message edited by: Dirk Schreckmann ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll assume that you're using a Statement (from a Connection.createStatement() invocation).
Try this modified code out for size.
Before too long of fussing around with funny looking string concatenation and character escaping and single-quote matching, you'll probably want to discover the use of a PreparedStatement. Try a quick search on this forum for example uses of a PreparedStatement.
[ April 27, 2003: Message edited by: Dirk Schreckmann ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic