I have created an application that accepts user input into textboxes and this data needs to be written as a record to a MySQL database. I have not used and SQL commands since VB6, and was wondering if there has been a change as to how this is done.
Printable View
I have created an application that accepts user input into textboxes and this data needs to be written as a record to a MySQL database. I have not used and SQL commands since VB6, and was wondering if there has been a change as to how this is done.
ADO.NET is the way to go. The 101 samples (available from a sticky thread on this forum) contain data access examples. Steer clear of the ADO 2.6 example though. Most Microsoft example code uses SQL Server, and thus the System.Data.SqlClient namespace. You can easily convert to a different data namespace, like OleDb, as there is a virtual 1:1 correspondence between classes, e.g. SqlConnection <=> OleDbConnection. There is no native MySQL namespace but you can download third party solutions that reproduce the equivalent behaviour. Get one here.