Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Enterprise Integration Forum

Enterprise Integration Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: Connect to either odbc -or- oledb at runtime?
Thomas Kennedy 22.Mar.07 02:13 PM Lotus Notes
LC LSX LC LSX - All Releases; LS:DO - All Releases AIX, Windows 2000


Right, no lsxodbc, i had forgotten about the odbc connector for LCLSX. Our servers will soon be on Unix, so here is what we are going to try:
  1. Public Class Connection
  2. Public connection As LCConnection
  3. Private session As NotesSession
  4. Sub new
  5. Set Me.session = New NotesSession
  6. End Sub
  7. Public Sub initialize
  8. Select Case session.isonserver
  9. Case True
  10. Set Me.connection = New LCConnection("odbc2")
  11. Case False
  12. Set Me.connection = New LCConnection("oledb")
  13. End Select
  14. End Sub
  15. End Class

for script that runs locally (in our environment this is always Windows):

set connection = new connection
connection.initialize
with connection.connection
.provider = "sqloledb"
etc
end with

for script that runs on the server (which will be Unix pretty soon):

set connection = new connection
connection.initialize
with connection.connection
whatever properties are required for using the odbc connection - why are these not documented???????????
end with

With this arrangement we can write script that works with SQL Server and can be invoked at either the client or server.

You may be wondering why I don't instantiate the LCConnection right away in the constructor. I'm glad you asked. The answer is that under 6.5.5 for Windows, if you instantiate an LCConnection with the oledb argument, and never call .connect, Notes drag and drop stops working (that is, when the LCConnnection passes out of scope), and then it crashes. Therefor the Initialize method, to be called when we are sure we want to connect to something.




Connect to either odbc -or- oledb a... (Thomas Kennedy 12.Mar.07)
. . RE: Connect to either odbc -or- ole... (Charles E. Robi... 21.Mar.07)
. . . . RE: Connect to either odbc -or- ole... (Thomas Kennedy 22.Mar.07)
. . . . . . RE: Connect to either odbc -or- ole... (Charles E. Robi... 23.Mar.07)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow