Hello,
I created a class with some database functions for MySQL and I used a PHP class and I rewritten that to VB.NET. Now I like to know how I could get information from the database and use that information. Here is my class:
I don't know how to extract information from a query line and I like to know how to do that. My database table is:
UserID | UserName | UserPass | UserRole
Could somebody help me?
I created a class with some database functions for MySQL and I used a PHP class and I rewritten that to VB.NET. Now I like to know how I could get information from the database and use that information. Here is my class:
Code:
Public Sub Query(ByVal sql)
Try
Dim conn = Connect()
Dim myCommand As New MySqlCommand
myCommand.CommandText = sql
myCommand.Connection = conn
myCommand.ExecuteNonQuery()
Catch myerror As MySqlException
logMessage("Error: " & myerror.Message)
Exit Sub
End Try
End Sub
UserID | UserName | UserPass | UserRole
Could somebody help me?