How to connect db through input from userform

Closed
Aadi - 17 Nov 2016 à 13:11
yg_be Posts 23526 Registration date Sunday 8 June 2008 Status Contributor Last seen 14 April 2025 - 17 Nov 2016 à 15:53
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)
Related:

1 response

yg_be Posts 23526 Registration date Sunday 8 June 2008 Status Contributor Last seen 14 April 2025 5
17 Nov 2016 à 15:53
Does that work as is?