How to Add-Update-Delete Record Using MySQL

Yet another sample program that will teach you on how to add, update, delete a record but this time using MySQL database. The sample is based on the previous source code I uploaded here called How to Add-Update-Delete Record with Search Function.

In order to run this program you need to import first the text file contain in the zip file called “northwind.sql” to your MySQL Server. To understand more on the pre-requisite on running this program with MySQL please read Visual Basic and MySQL.

The program based on the previous tutorial using MS Access contains a few modification in order to run using MySQL Database.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byAnonymous (not verified)on Thu, 10/29/2009 - 22:50

please i have a problem in saving into access database, can you help me with the code to save and retrieve data from the database.
Submitted byAnonymous (not verified)on Fri, 10/30/2009 - 19:14

hi mam. how r u. this is vinu. pls help me i have doubts in visual basic and send me mail dot net projects. how create a login form in vb to oracle. i am studying mca. i want projects for next sem. that why send me a wonder projects

First of all...Do I look like a girl? hehehe. I don't know about Oracle 'coz I'm not using it. But whether you are using MS Access, SQL Server, MySQL the concept is still the same. Look at the tutorial that I have here on how I connect vb.net to MS Access, SQL Server and MySQL with just a few modification on the source code.
Submitted byAnonymous (not verified)on Thu, 11/12/2009 - 11:58

Hi sir.. Thank you for the tutorial.. It is easy to understand.. Here I'm doing your tutorial in update, delete and view form mysql.. But i got this error at FillListView(lvList, GetData(sSql)).. The explanation from this error i got is Unable to cast object of type 'MySql.Data.MySqlClient.MySqlException' to type 'MySql.Data.MySqlClient.MySqlDataReader'. I really does'nt understand abt this error.. can you tell me how can i fix this error.. Thank you for advanced!
Submitted byJamskyon Wed, 11/25/2009 - 16:28

Help naman po, how can i send a text message using vb.net? need ko po code for this. I have a project, a stock and inventory system that have a feature that will automatically send a text message to a cellphone if an item is about to be out of stock. Sakit na po ng ulo ko d2! sana matulungan nyo po ako! thanks!

hi sir, can you help me about my project,? it is a video rental system, i just don't know how to add, edit, search and update datas. what are the right codes for it? pls PM me asap sir. thank you
Submitted byAnonymous (not verified)on Wed, 12/30/2009 - 12:54

i've problem bro Could not load file or assembly 'MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified. what thats mean ?? and what should i do?? please.. ps: mysql 5.1.30 vb 2008 express edition
Submitted byAnonymous (not verified)on Sun, 01/10/2010 - 12:49

sir, please help me with my project. its like the usual game, texttwist, but the the difference is that i will be linking about 4 computers (the 3 are the for the users and the other 1 is for the server). my concern is that i still don't have an idea of how to link one pc to another using visual basic. or can you recommend what language should we use that you think is easier to use. please sir. i really need it badly.m5
Submitted byAnonymous (not verified)on Tue, 01/12/2010 - 01:11

please help me. I'm trying to add a checkbox into the form with the sample tutorial you posted. I already had a column into the database, but I don't know the code so that when you check on that check box it will save into the database. example: checkbox1: item one checkbox2: item two checkbox3: item three. etc. in the database column (customer and type of call) type of call colum: item one, item two => if they were selected please help. thank a bunch.
Submitted byumepinkieon Tue, 01/12/2010 - 01:23

I have a problem with adding checkboxes and connect those to the database. Can you help me please. I'm new to the VB world. I know nothing about visual basic. :( I was trying to add checkboxes with the how to update add program you wrote. What I'm trying to do is add check boxes so that once you checked it, the item you check will be save into the database. For example: checkbox 1: item 1 checkbox 2: item 2 checkbox 3: item 3 and if I checked checkbox 1 and 2, in the database I want it to save those check as item 1, item2. The items will be separate by a comma. I am in clueless. Please help.
Submitted byAnonymous (not verified)on Sat, 01/16/2010 - 20:55

please help me i need some source code for the file maintenance in VB.Net using datagrid and Access here are some file maintenance i need, ADD,DELETE,EDIT,SAVE,and SEARCH.. please help me T_T
Submitted byAnonymous (not verified)on Sat, 01/16/2010 - 20:57

please help me i need some source code for the file maintenance in VB.Net using datagrid and Access here are some file maintenance i need, ADD,DELETE,EDIT,SAVE,and SEARCH.. please help me T_T

Hhmm..I could help you on dis..You can download my sample file management here... It might be the answer to your problem.heres the link. http://www.sourcecodester.com/visual-basic-net/introduction-adonetoledbconnection.html or http://www.sourcecodester.com/visual-basic-net/adonet-odbcconnection.html
Submitted byAnonymous (not verified)on Wed, 01/20/2010 - 01:39

how can i link RFID reader (serial port) to VB 2008..
Submitted byAnonymous (not verified)on Tue, 01/26/2010 - 06:00

I used your code and had a set the column Log ID for autonumber, but when I run the program it won't let me double click on the listview item to view the entry. it said that the data does not match.
Submitted byAnonymous (not verified)on Sun, 01/31/2010 - 11:00

hi mr jay i am using your hotel management system but one problem i need access your database first "asscess database"so need password for a ms access database so i can make copy to my sql server my e-mail [email protected]
Submitted byAnonymous (not verified)on Fri, 03/05/2010 - 21:06

What is the Solution in this problem the reference component 'MySql.Data' could not be found
Submitted byAnonymous (not verified)on Sat, 03/13/2010 - 01:52

sir please can you send me the SQL Server Exampel of the Same. BackEnd :SQL DataBase FrontEnd :VB6 my mail id is [email protected]
Submitted byAnonymous (not verified)on Mon, 05/03/2010 - 09:00

Deleting a record bring this error: in this line: strDeleted = ExecNonQuery("DELETE Customers.CustomerID FROM Customers WHERE CustomerID= '%" & CustomerID & "%'") with this error: Conversion from type 'MySqlException' to type 'Boolean' is not valid.
Submitted byAnonymous (not verified)on Sat, 05/29/2010 - 23:54

sir im having problem in importing the sql file.. it says 'unknows customers table in information schema. by the way im using mysqlfront.. could you help me. to use this. im preparing for our thesis.. next sem.. and im just a newbie in vb.net.. asap
Submitted byAnonymous (not verified)on Mon, 06/21/2010 - 20:36

how i can find the step by step procedure of that program??
Submitted byAnonymous (not verified)on Sat, 07/03/2010 - 23:41

when i run the program it points at the "Call FillList" and shows the error "Could not load file or assembly 'MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified." and does this program automatically connects to mysql? because i've already imported the northwind txt file to xampp and still doesn't connect. thanks!
Submitted bypeteron Sat, 07/03/2010 - 23:52

when i run the program it points at the "Call FillList" then shows this error "Could not load file or assembly 'MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified." and is this program applicable to xampp mysql? because I've already imported the northwind text file and still doesn't work? THANKS!
Submitted byAnonymous (not verified)on Sun, 08/01/2010 - 23:27

i cant connect the application that i download hir it to the mysql database???? can u help me
Submitted byAnonymous (not verified)on Mon, 08/02/2010 - 20:07

we can't run the program due to this line: FillListView(lvList, GetData(sSql) the error says: Unable to cast object of type 'MySql.Data.MySqlClient.MySqlException' to type 'MySql.Data.MySqlClient.MySqlDataReader'. what should we do? we don't know what the error means..huhu kalurky..hehe can you please explain.. thank you very much.. Godbless..:)
Submitted byAnonymous (not verified)on Tue, 08/03/2010 - 20:56

sir i am bharat suryawanshi and this my contact no. 9893690811
Submitted byAnonymous (not verified)on Fri, 11/26/2010 - 02:40

Hi.. I need see your code running, but is imposible because when I started, says this error.. you have idea what is that. sorry about my english.. error No se puede convertir un objeto de tipo 'MySql.Data.MySqlClient.MySqlException' al tipo 'MySql.Data.MySqlClient.MySqlDataReader'
Submitted byAnonymous (not verified)on Tue, 01/04/2011 - 20:02

please i can create update delete while working with wamp server. but i upload the site the update faile to work please help me my name is Area
Submitted byAnonymous (not verified)on Sat, 01/22/2011 - 17:45

sir i want to help for my RFID project please tell me what s the way to interact with hardware and software means when rifd card swap then how transaction is perform
Submitted byAnonymous (not verified)on Wed, 03/02/2011 - 21:27

my project name is gold shop inventory so i need a database connectivity using sql server 2005 sir .how to add delete update save commands using sql server 2005.pls help me .
Submitted byAnonymous (not verified)on Mon, 12/12/2011 - 09:49

Sir when my open the download source code in vb 2008..its only a read only?...tnx..
Submitted byanonymous (not verified)on Sat, 02/11/2012 - 14:31

still nothing happened after clicking the mysql.data.dll file. i still get the same error.. "Namespace or type specified in the Imports 'Mysql.Data.MysqlClient' doesn't contain any public member or cannot be found. make sure the namespace of the type is defined and contains at least one public member. Make sure the imported element name doesn't use aliases.. "
Submitted byAnonymous (not verified)on Wed, 09/12/2012 - 10:50

Unable to cast object of type 'MySql.Data.MySqlClient.MySqlException' to type 'MySql.Data.MySqlClient.MySqlDataReader'. pls help me
Submitted byJohn McClain (not verified)on Wed, 11/28/2012 - 04:25

"Unable to cast object of type 'MySql.Data.MySqlClient.MySqlException' to type 'MySql.Data.MySqlClient.MySqlDataReader'." Either provide some guidance or take down the program.

Add new comment