How to connect db through input from userform

Closed
Aadi - Nov 17, 2016 at 01:11 PM
yg_be Posts 22694 Registration date Sunday June 8, 2008 Status Contributor Last seen April 17, 2024 - Nov 17, 2016 at 03:53 PM
Hello,

i need to connect to db server with the inputs from the userform. here is the code. Please correct/add if any.

user = Val(REPORT.TextBox1.Value)
pwd = Val(REPORT.TextBox2.Value)
db = Val(REPORT.TextBox3.Value)
strCon = "Driver={Microsoft ODBC for Oracle};CONNECTSTRING=db;uid=user;pwd=pwd;"
connect.Open (strCon)

1 response

yg_be Posts 22694 Registration date Sunday June 8, 2008 Status Contributor Last seen April 17, 2024 5
Nov 17, 2016 at 03:53 PM
Does that work as is?
0