Database ?

I have executed this code :
row = dbAccount.executeNonQuery("insert PRODUCTDETAIL " +
                        "values('" + max + "','" + productDetailRealID + "','" + name + "','" + image + "','" + price
                        + "','" + englishDescription + "','" + vietnameseDescription + "','" + englishMoreDescription
                        + "','" + vietnameseMoreDescription + "','" + pricePerUnit + "','" + pause + "','" + day + "','" + month + "','" + year + "','" + stateID + "','" + kindID +
                        "','" + categoryID + "','" + capacityID + "','" + concentrationID + "','" + TTNH + "','" + totalReview + "')");      

Then I checked row's value . Row's value is 0 . But in my database , that record has been inserted successfully . Why ? Why doesn't row's value is 1 ?
tunhienAsked:
Who is Participating?
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
If dbAccount is an object of a class that you developed, what is the logic in the executeNonQuery () method? Can you post it?
0
 
KantiCommented:
INTO is missing
INSERT INTO "TABLENAME" ("column1", "column2", ...)
VALUES ("value1", "value2", ...)
0
 
Nguyen Huu PhuocSenior ManagerCommented:
I think you should let me know the type of dbAccount variable.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Mayank SAssociate Director - Product EngineeringCommented:
>> INTO is missing

Strange that the row is still inserted :)

Could you post the correct code that is being used?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
? is that the answer you want?
0
 
Nguyen Huu PhuocSenior ManagerCommented:
I doesn't know what the author want,too
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.