I cannot seem to find any examples of doing an insert, there are lots of selects and updates. Has any one got sample code of doing an insert using an SQL statement and passing parameters.
Thanks,
Chris
I cannot seem to find any examples of doing an insert, there are lots of selects and updates. Has any one got sample code of doing an insert using an SQL statement and passing parameters.
Thanks,
Chris
Code:jdbcTemplate.update("insert into foo (col1, col2) values (?, ?) ", new Object[] { value1, value2 })
Thansk for good example. If we are able to do the insert and update with thiscode, then why we useCode:jdbcTemplate.update("insert into foo (col1, col2) values (?, ?) ", new Object[] { value1, value2 })
What is the use of third parameter as argTypes. Kindly tell us when we should use argTypes parameter and in which condition we should not use this. Please one samll example also.Code:int update(String sql, Object[] args, int[] argTypes)
Thanks in advance,
Thanks,
Ayush Suman
http://ayushsuman.blogspot.com