I want to use a DSN less connection to connect to our SQL server Database.
I have done this in VB Script ASP but the dialect is slightly different in VB 6.
here is my code: in VB6
Dim Conn As Object
Dim Rs1 As New ADODB.Recordset
Set Conn = server.CreateObject("ADODB.Connection"
Conn.Open "driver=SQL Server;server=smallbserver;uid=sa;pwd=;database=Universal;"
Set Rs1 = Conn.Execute("SELECT [EmployeeID], [FirstName], [LastName] FROM Personnel Where [EmployeeID] = '" & EmpID1 & "'"
I get an error "Object required" on the "Set Conn = "
line.
TIA
I have done this in VB Script ASP but the dialect is slightly different in VB 6.
here is my code: in VB6
Dim Conn As Object
Dim Rs1 As New ADODB.Recordset
Set Conn = server.CreateObject("ADODB.Connection"
Conn.Open "driver=SQL Server;server=smallbserver;uid=sa;pwd=;database=Universal;"
Set Rs1 = Conn.Execute("SELECT [EmployeeID], [FirstName], [LastName] FROM Personnel Where [EmployeeID] = '" & EmpID1 & "'"
I get an error "Object required" on the "Set Conn = "
line.
TIA