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


Andreas2 Olesch 20.Nov.07 11:35 AM a Web browser
LC LSX Lotus Connectors - All Releases All Platforms


Hi there,

i have a problem connecting to a MSSQL Server using LotusScript Extensions.

I have installed a MSSQL Express Server (defaults) and I am able to connect to it with the SQL Server Management Studio Express. Also I am able to create a new ODBC Connection to it. So my conclusion so far is, that the server is running :) .

After that I created an agent to test the connectivity from my Notes Client (the server is running on local machine).

The code is:

Const SERVER = "AOL0002N/SQLEXPRESS"
Const USER = "sa"
Const PASS = "****" 'my password
Const DATABASE = "Northwind"

Const BUILD = "0001"

Dim nl As New NotesLog( "" )
Call nl.OpenFileLog( "c:\MSSQLTest_" & Format( Now, "yyyymmddhhnnss" ) & ".txt" )
Call nl.LogAction( "MSSQLTest Build " & BUILD )

Call nl.LogAction( "Server: " & SERVER )
Call nl.LogAction( "Database: " & DATABASE )
Call nl.LogAction( "User: " & USER )
Call nl.LogAction( "Pass: *******" )

Dim clcSession As LCSession
Dim clcConnection As LCConnection

Set clcSession = New LCSession

bIsValid = clcSession.LookupConnector( "oledb" )
Call nl.LogAction( "LookupConnector: " & bIsValid )

'test connection
Set clcConnection = New LCConnection( "oledb" )
clcConnection.Provider = "SQLOLEDB"
clcConnection.Database = DATABASE
clcConnection.Server = SERVER
clcConnection.UserID = USER
clcConnection.Password = PASS

Call clcConnection.Connect() 'FAILING!!!
connect = clcConnection.IsConnected

Call nl.LogAction( "IsConnected: " & connect )

Call nl.LogAction( "Status: " & clcsession.GetStatusText() )

The created logfile:

: 20.11.2007 17:27:18: MSSQLTest Build 0001
: 20.11.2007 17:27:18: Server: AOL0002N/SQLEXPRESS
: 20.11.2007 17:27:18: Database: Northwind
: 20.11.2007 17:27:18: User: sa
: 20.11.2007 17:27:18: Pass: *******
: 20.11.2007 17:27:18: LookupConnector: True
: 20.11.2007 17:27:35: Error (12325): Error:
ErrorRecord: HResult: 0x80004005
Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server existiert nicht oder

(Translation of the error msg: SQL Server does not exist or)

Yes, correct, its cut off.

What am I doing wrong? I can connect to Oracle or SAP Systems using similar code.

Thanks for your help,
Andreas






Accessing a MSSQL Server via LCLSX (Andreas2 Olesch... 20.Nov.07)
. . RE: Accessing a MSSQL Server via LC... (Thomas Kennedy 20.Nov.07)
. . . . RE: Accessing a MSSQL Server via LC... (Andreas2 Olesch... 21.Nov.07)
. . ODBC Example for Accessing a MS SQL... (Ken A Collins 21.Nov.07)
. . . . RE: ODBC Example for Accessing a MS... (Thomas Kennedy 21.Nov.07)
. . SOLUTION: Accessing a MSSQL Server ... (Andreas2 Olesch... 21.Nov.07)





  Document options
Print this pagePrint this page

 Search this forum

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

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

 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