This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 15, 2013, 3:21 PM
50 Posts
topic has been resolvedResolved

ODBCConnection initiated from an XPage

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: ODBC,datasource
  • Replies: 2
I've run into puzzling issue. I am also trying to make a connection to an Oracle database via an ODBC datasource on the server. I launch a lotusscript agent from a button on my xpage with the following code:
var id = currentDocument.getNoteId()
var agent = database.getAgent("agentname")
agent.runOnServer(id)
My agent is very simple at this point; all I'm trying to do at this point is connect to the oracle database and disconnect consistently:
Option Public
Option Declare
UseLSX "*LSXODBC"
 
Sub Initialize
     Dim con as New ODBCConnection
     If not con.ConnectTo("dataSourceName", "UserID", "Password")
           Print "Connection to Oracle FAILED - " + con.GetExtendedErrorMessage
     Else
           Print "Connection to Oracle SUCCEEDED"
     End If
End Sub
The extended error message on fail is: Specified driver could not be loaded due to system error  1114(Oracle in OraClient10g_home1)
 
Any ideas why I cannot reconnect after that initial connection?
Jan 15, 2013, 3:56 PM
366 Posts
Re: ODBCConnection initiated from an XPage
 Not sure why you're experiencing this issue but I can reccomend that you eliminate some of the moving parts.
 
Calling an LS agent that uses ODBC is not going to perform well for anything other than very minor queries. 
 
My recommendation would be to either use the JDBC connection components from the Extension Library on Open NTF or simply use a Pure Java JDBC implementation to make the connection. 
 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal