Hi,
I have the following connection string:
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Driver={SQL Server};" & _
"Server=127.0.0.1;" & _
"Database=Master;" & _
"user id=test;" & _
"password=test;"
Set objRSSQL = CreateObject("ADODB.Recordset")
Is it possible to have the Server IP, user id and password specified by the user with an inputbox instead of manually having to edit the script with notepad and keeping the password in there?
ServerIP = InputBox("Please enter SQL Server IP?")
msgbox "Your IP entered is: " & ServerIP
UserID = InputBox("Please enter the SQL Server username for IP: " & ServerIP)
msgbox "Your entered username is: " & UserID
PassID = InputBox("Please enter the SQL Server password for username: " & UserID)
msgbox "Your entered password is: " & PassID
' "Server="&ServerIP&";" & _
' "user id="&UserID&";" & _
' "password="&PassID&";"
Can someone please help with the correct syntax for those 3 lines!
Thanks
I have the following connection string:
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Driver={SQL Server};" & _
"Server=127.0.0.1;" & _
"Database=Master;" & _
"user id=test;" & _
"password=test;"
Set objRSSQL = CreateObject("ADODB.Recordset")
Is it possible to have the Server IP, user id and password specified by the user with an inputbox instead of manually having to edit the script with notepad and keeping the password in there?
ServerIP = InputBox("Please enter SQL Server IP?")
msgbox "Your IP entered is: " & ServerIP
UserID = InputBox("Please enter the SQL Server username for IP: " & ServerIP)
msgbox "Your entered username is: " & UserID
PassID = InputBox("Please enter the SQL Server password for username: " & UserID)
msgbox "Your entered password is: " & PassID
' "Server="&ServerIP&";" & _
' "user id="&UserID&";" & _
' "password="&PassID&";"
Can someone please help with the correct syntax for those 3 lines!
Thanks