Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert statement from Java programme.

Status
Not open for further replies.

newJack12

Programmer
Mar 20, 2008
1
GB
how do i insert a variable from my java programme as a value for a field in an access db. I have tried the following code where imagePath is the variable.
stmt.executeUpdate("INSERT INTO Images ( path,keyword1) VALUES (imagePath, landscape)");
 
First you are off topic as you are asking a JET (Access) SQL question in an Access as a Front End to SQL forum.

Secondly I don't know how you'd send a SQL command from JAVA.

The Syntax for a JET query to append literals would look soemething like the following.

Code:
Insert Into Images (Path, Keyword
Select ImagePath as expr1, Landscape as expr2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top