bench
New member
How can I be able to convert the following codes (VBScript) to VB .NET:
I hope somebody can help me regarding this issue.
Thanks,
Bench
VB.NET:
Dim dbs As DAO.Database
Dim rstContact As DAO.Recordset
Dim rstOptUser As DAO.Recordset
Dim reg_strUserName As String
' Open the Recordsets
Set dbs = CodeDb
If reg_strUserName = "" Then
Set rstOptUser = dbs.OpenRecordset("tblSMPreferenceUser", dbOpenSnapshot, dbSeeChanges)
Else
Set rstOptUser = dbs.OpenRecordset("SELECT * FROM tblSMPreferenceUser WHERE strUserName = """ & reg_strUserName & """", dbOpenSnapshot, dbSeeChanges)
End If
Set rstContact = dbs.OpenRecordset("SELECT * FROM tblARCustomer WHERE strClass = 'Customer' And ysnActive = True", dbOpenSnapshot, dbSeeChanges)
Thanks,
Bench
Last edited by a moderator: