Tutorial by Examples

Public Function GetUserFirstName(UserName As String) As String Dim Firstname As String = "" 'Specify the SQL that you want to use including a Parameter Dim SQL As String = "select firstname from users where username=@UserName" 'Provide a Data Sourc...
This simple function will execute the specified Select SQL command and return the result as data set. Public Function ReadFromDatabase(ByVal DBConnectionString As String, ByVal SQL As String) As DataTable Dim dtReturn As New DataTable Try 'Open the connection using the connection...
This simple function can be used to get value from exactly one field one record query result Public Function getDataScalar(ssql As String) openConnection() Try Dim q As New MySqlCommand q.Connection = db q.CommandText = ssql getDataScalar = q.Execut...

Page 1 of 1