Got it, thank you very much!
:)
Cheers,
Neil
On Dec 19, 11:02 pm, Marcin Jurczuk wrote:
> Neil,
>
> from java.SQL:
> return INT - executeUpdate()
> Executes the SQL statement in this PreparedStatement object,
> which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL
Neil,
from java.SQL:
return INT - executeUpdate()
Executes the SQL statement in this PreparedStatement object,
which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL
statement that returns nothing, such as a DDL statement.
return ResultSet executeQuery()
Ex
It works now.
I use the same executeUpdate method, and it can insert into the db.
Thanks Marcin,
Cheers,
Neil
On Dec 19, 1:29 am, "Neil.Lv" wrote:
> Hi Marcin,
>
> Thank you very much! The update statement works now!
>
> There is a question about the insert statement, how can i use
Hi Marcin,
Thank you very much! The update statement works now!
There is a question about the insert statement, how can i use the
prepareStatement ?
###
"INSERT INTO blogs click_counts=100 WHERE id=1"
###
I'm not familiar with it,
Thanks very much!
:)
Cheers,
Neil
On Dec
Hi,
You have few options:
- DB.runQuery("UPDATE blogs set click_counts=click_counts+1 WHERE
id=1")
- DBprepareStatement("UPDATE blogs set click_counts=click_counts+1
WHERE id=?",yourDBConnection) {
stmt =>
stmt.setLong(1,1)
stmt.executeUpdate()
}
Where first 1 in setLong is position in prepared st