Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Okay so I need to find out if any of this is possible and the code needed.

I'm using MySQL and need to know how to create, delete, move entries, check if they exist, search / filter results with containing strings, link tables and updating results.
Any other functions would also be useful to me but the ones above are essential.

I'm using ADO.NET MySQL Connector in VB.NET.

Thank you for any help.
Posted
Updated 8-Jan-13 9:35am
v3
Comments
Sergey Alexandrovich Kryukov 8-Jan-13 16:14pm    
Everything is good, except one part: "I'm using MySQL". I think this is a huge exaggeration.
—SA

1 solution

All of this is basic SQL, as far as I can tell. What do you mean 'the code needed' ? We can't write code based on these vague requests. Do you know SQL ?
 
Share this answer
 
Comments
Kieran Crown 8-Jan-13 15:09pm    
Yeah sorry, I meant something like this for each:
Dim DatabaseConnection As New MySqlConnection("Server=173.254.28.25;Database=antivuru_Rozzle;Uid=antivuru_Rozzle;Pwd=passwordexample")
Dim Query As String = String.Empty
Dim SQLCommand As MySqlCommand
Dim DataReader As MySqlDataReader

Query = "INSERT INTO users (Username,Password,Email_Address,Full_Name,Join_Date) " & _
"VALUES ('" + TextBox1.Text.ToLower + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + Date.Today + "') "
SQLCommand = New MySqlCommand(Query, DatabaseConnection)
DatabaseConnection.Open()
SQLCommand.ExecuteNonQuery()
DatabaseConnection.Close()
MsgBox("Done")
Christian Graus 8-Jan-13 15:11pm    
Well, that code is a disaster. you should read up on SQL injection attacks, and parameterised queries. Along the way, you'll see how to run any SQL you like.
Kieran Crown 8-Jan-13 15:13pm    
Where can I read up on these?
Christian Graus 8-Jan-13 15:25pm    
http://blog.divergencehosting.com/2009/04/09/using-parameters-parameterized-queries-database-interactions-cshar-vbnet/ Google even auto completed it for me, it's searched for that often

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900