How can I pass the values of a data source name, a user name and the password to the ODBCConnection? Where would I declare the variables:
How do I use SilentMode property?
I connected to the SQL server with Domino using Lotus Script, and I can fetch and insert data. But, my problem is in trying to avoid the data source name dialogbox and SQL server login box. Whenever I connected as con.Connect to DSN, the DSN dialogboxes appears, then the username and password inputbox appears.
I couldn't pass the three parameters (connection name, username and password) at the same time. It gives an error when I give the following syntax: con.ConnectTo(dsn,username,password). But, it does accept: con.ConnectTo(dsn).
I use this exact feature frequently to access a variety of SQL databases. The following code snippet is actual code that I copied from a working application the is accessing a DB2 database:
Uselsx "*LSXODBC" ? This line would be in Options Dim odbcCon as ODBCConnection Set odbcCon= New ODBCConnection intFlag=odbcCon.ConnectTo(strConnect, strUserName, strPassword)
"strConnect" is a string parameter that contains a valid DSN.
"strUserName" is a string parameter that contains a valid user name
"strPassword" is a string parameter that contains a valid password
Have you checked the Lotus site to see if this has been reported as a bug for your version of Domino? I can't see a reason why this would not work unless you are not supplying a valid name or password.
Related Q&A from Dave Hatter
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.