Hi, Guys,
I am trying to use changepoint COM+ API in LotusScipt library, got the “external founction not found” error.
Background:
** ChangePoint is a windows .net and browser based software, it has SQL server in backend
**I need to convert Lotus Notes Emails and inserted new records in Changepoint SQL Database throught its API.
My Question:
a. Does LotusScript support calling COM+ API?
b. If it does, is the following declarition correct:
Declare Public Function Notes_CP_Connect Lib “C:\Program Files\Changepoint\COMAPIDemo\ChangepointAPI2000.dll” Alias “Connect” (Byval ServerName As String,Byval DatabaseName As String, Byval SQLUserId As String,Byval Password As String, Byval TimeOut As Long) As Long
Thanks in advance,
Bill
================
FYI: The following are the description from changepoint and my coding (not works yet)
================
Option Public
Option Declare
Declare Public Function Notes_CP_Connect Lib “C:\Program Files\Changepoint\COMAPIDemo\ChangepointAPI2000.dll” Alias “Connect” (Byval ServerName As String,Byval DatabaseName As String, Byval SQLUserId As String,Byval Password As String, Byval TimeOut As Long) As Long
Declare Public Function Notes_CP_DisConnect Lib “C:\Program Files\Changepoint\COMAPIDemo\ChangepointAPI2000.dll” Alias “Disconnect” () As Long
Sub ConvertSelectedEmailToCP()
On Error Goto ErrorHandler
Dim ws As NotesUIWorkspace
Dim ss As notessession
Dim db As notesdatabase
Dim uiView As NotesUIView
Dim coll As notesdocumentcollection
Dim docMemo As NotesDocument
Dim i,j As Integer
If Not ConnectChangePoint() Then
Messagebox "Can't connect to change point. "+"Error: " + Error$ ,64,"Connect Changepoint"
Exit Sub
End If
End Sub
Function ConnectChangePoint() As Boolean
ConnectChangePoint=False
Dim ServerName As String
Dim DatabaseName As String
Dim SQLUserId As String
Dim Password As String
Dim TimeOut As Long
Dim ConnectResult As Long
ServerName="servfername"
DatabaseName="CATest"
SQLUserId="username"
Password="password"
TimeOut=120
ConnectResult=Notes_CP_Connect(ServerName,DatabaseName,SQLUserId,Password,Timeout)
If ConnectResult=0 Then
ConnectChangePoint=True
End If
End Function
================
2.Changepoint API Requirements
The Changepoint API assumes the user of the API component has working knowledge of object-
oriented programming and working with Microsoft scripting runtime dictionary objects.
The Changepoint API component requires the following:
. Microsoft .NET Framework
. CP Security
. Microsoft Visual Basic Virtual Machine 6.0
. Microsoft ActiveX Data Objects 2.5 (or more recent)
. Microsoft Scripting Runtime
. Changepoint software installed on the server.
. COM+ support (i.e. Windows 2000 and above operating system)
. Access to the core Changepoint COM+ components. This means either the standard Changepoint
COM+ components must be installed on the interfacing machine or an Exported set of Proxy
COM+ components must be installed on the interfacing machine.
Installing Changepoint API
- The ChangepointAPI2000.dll must be registered in COM+. To register the dll, double-click
the ChangepointAPI2000.MSI located in the COM folder.
- To install the test client, run the Changepoint COM API and Web Service Setup Kit (located in
the SETUP folder) and select the COM API Test Client option.
Accessing the Changepoint COM+ Components Using the
Changepoint API
As mentioned above, it is necessary to have access to the core Changepoint COM+ Components in
order to use the API. If you are installing the API on a machine other than one on which you would
normally install the COM+ components (i.e. your IIS servers), then you will have to do one of two
things:
- Install the Changepoint.msi application on the machine according to the normal installation
instructions provided by Changepoint. This option is generally the preferred option as
interaction will now proceed between the API, the core COM+ components and the
Changepoint database, without impacting the users of the enterprise application.
- Use Component Services to export the COM+ components from the IIS server. Then install the
exported package on the API machine. This creates proxy COM+ components that call over to
the IIS server and the IIS servers component will then make changes to the database. This
option may be necessary if the API machine does not have access to the database server due to
network configuration.
,With the introduction of the standard database role in Release 8.01, the COM API
requires the SQL account for the above role to be manually mapped to a Changepoint
account in the LOGINID column of the SQLLOGIN table, otherwise errors will be
generated.
================