mysql - How come I know that my execute statement is working fine? -


i'm novice groovy , have doubt. let's i'm doing :

db.execute ''' //my sql commands ''' 

programmatically how can find execute method succeeds?

i tried way :

def status = db.execute ''' //my sql commands ''' 

but though data have been inserted db ( have viewed in mysql client ), status returns false. confusing me. whats going on?

i'm assuming you're using groovy.sql.sql object. if @ api (linked previously) execute() method, says return false either row count return value or no results return value.

since mentioned insert statement, check row count via:

if (db.updatecount() > 0) { /* success! */ } 

Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -