Q

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 last published in May 2002

Dig Deeper on Domino Resources - Part 2

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close