• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

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 ?
0
tunhien
Asked:
tunhien
  • 3
  • 2
1 Solution
 
Mayank SAssociate 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
 
phuocnhCommented:
I think you should let me know the type of dbAccount variable.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
phuocnhCommented:
I doesn't know what the author want,too
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now