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


Samrat S Roy 29.Mar.10 03:17 AM a Web browser
LC LSX All Releases All Platforms


Hi Forum,

I have written a procedure in Oracle which works fine when I call it from SQLPLUS interface, But when I try to call it from lotus script it does not returns anything. I am pretty new to lcconnection so may be I am getting wrong in some place.

need your help on this, If you can please go through the code once may be you can catch the error!

here is the Oracle Procedure:
=========================================
create or replace PROCEDURE TEST
( param1 IN VARCHAR2
, param2 IN VARCHAR2
, param3 out VARCHAR2) AS
BEGIN

INSERT INTO "SAMRAT"."TBLCOUNTRY"
(
COUNTRYCODE ,
COUNTRY
)
VALUES
(
param1 ,
param2
) ;
COMMIT ;
param3 := 'sa';
END TEST;
=========================================



Here is the LotusScript Agent:
=========================================
Option Public
Option Explicit
UseLSX "*lsxlc"

Sub Initialize()
Call conntest()
End Sub


Sub conntest()

Dim Con As New LCConnection ("oracle")
Dim Parms As New LCFieldList
Dim Result As New LCFieldList
Dim Parm As LCField

Con.Server = "OraTestN"
Con.Userid = "samrat"
Con.Password = "password"

' set the connection property to the stored procedure name
Con.Procedure = "test"

' now connect
Con.Connect

Set Parm = Parms.Append ("param1", LCTYPE_TEXT)
Parm.text = "pak21"
Set Parm = Parms.Append ("param2", LCTYPE_TEXT)
Parm.text = "pakisthan"

Set Parm = Parms.Append ("param3", LCTYPE_TEXT)
Parm.text = "asdf"

' using the fieldlist containing the field with the
' stored procedure parameter, call the stored procedure
Dim count As Variant

count = Con.Call (Parms, 1, result)

'@Forum: Here Count returns -1


If count = 0 Then
msgbox "No results were generated from the procedure call."
ElseIf count = LCCOUNT_UNKNOWN Then
msgbox "A result set was generated but the number of results is unknown."
Else
msgbox "The stored procedure returned " & count & " records."
End If

con.Disconnect

End Sub
=========================================

Note: also if the Param3 value within the oracle procedure returns a long string say 'Samrat' the the agent throws the error:[numeric or value error: character string buffer too small]
-> how do i set the size of 'Result' container?


Thanks you in advance...






call Oracle Procedure from lcconnec... (Samrat S Roy 29.Mar.10)
. . RE: call Oracle Procedure from lcco... (Samrat S Roy 29.Mar.10)





  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