Greetings, I feel foolish asking for this. I have this script and SQL database but the script is designed for an access database. I need the connection information converted to SQL but try as I might, I keep getting various errors. There is something I'm not doing right. Here's the original code:
Any thoughts would be helpful. Thanks in advance!
Code:
Sub subConnectionOpen
Set objCon = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.Recordset")
sProviderName = "Microsoft.Jet.OLEDB.4.0"
iCursorType = 1
iLockType = 3
sDataSource = "\\MAINSERVER\C$\pcinfo.mdb"
objCon.Provider = sProviderName
objCon.Properties("Data Source") = sDataSource
objCon.Open
objRS.CursorType = iCursorType
objRS.LockType = iLockType
objRS.Source = "Computerinfo"
objRS.ActiveConnection = objCon
objRS.Open
End Sub