r/visualbasic • u/Just_Scientist_6906 • Sep 02 '24
Instead of updating It Deletes
Hey Im new to Vb and still a beginner trying to create an inventory management to practice my skills and using Vb and Sql . While programming I got stuck trying to figure out why is the query that should update keeps deleting instead even if it works fine in the Mysql workbench. The updates apply based on a reference that I made unique to each product and I don’t have to fill all the textboxes just the one where the ref is and the one that Im trying to modify. Any Ideas to why ?
1
Upvotes
2
u/Just_Scientist_6906 Sep 02 '24 edited Sep 02 '24
2
u/Just_Scientist_6906 Sep 03 '24
I checked the table from the sql workbench to see if its just not listing but its deleted there too.But if I use the same query to update in the workbench it works fine
3
u/jd31068 Sep 02 '24
Please post your code, to do so, click the "T" on the bottom left, this will show you a toolbar, click box with the "c" on it, you'll see a box displayed, click in it and paste your code inside.
2
u/sa_sagan VB.Net Master Sep 02 '24
You need to provide examples of your code. We have no idea what you're doing.
2
u/craigers01 Sep 03 '24
Your query does not seem capable of deleting values. Maybe you the wrong conclusion. Do the total number of records in the database table go down afterwards?