Ask the Expert

Accessing a variety of SQL databases

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:

Uselsx "*LSXODBC"
%INCLUDE "lsconst.lss"

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.

This was first published in May 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: