How to connect db through input from userform [Closed]

Report
-
Posts
14484
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
March 5, 2021
-
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 reply

Posts
14484
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
March 5, 2021
4
Does that work as is?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!