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


Wayne A Sobers 5.May.11 06:18 PM a Web browser
LC LSX LC LSX - All Releases Windows


LCConnection insert returns count of 1, but no document is created in the target DB.

Our Service support system can only provide the record key for transactions that occur in its database tables.
I am using that key to select to an LCFieldList from the source DB, Fetching the data and using mapped LCFieldLists to update or insert the related FieldList into the target Notes DB.
The Fetch works, and I can see the information in the FieldLists, but the update fails and although the insert returns 1, there is no corresponding document created in the Notes database.
The specific problem is that although my counter records 113 inserts, there are only 26 documents added to the target DB.
The target view has the first two columns sorted ascending on the appropriate key fields.

Here is the key function:
'------------------------------------------------------------
Function Execute(operation As String) As String 'operation = D or U, returns "result" variable
Dim result As String
'
result = "NONE"
On Error GoTo processError
'
If operation = "D" Then
rcount = lconNotes.Remove(tgt_key_flds)
result = "DELETE"
Else
rcount = lconODBC.Select( src_key_flds, 1, Nothing)
'
rcount = lconODBC.Fetch(src_flds)
If rcount = 1 Then
If operation = "U" Then
Call convert_fields
If lconNotes.Update(tgt_flds,1,1) = 0 Then
If lconNotes.Insert(tgt_flds,1,1) = 0 Then
Error 1000, "neither update nor insert completed ok..."
Else
result = "INSERT"
End If
Else
result = "UPDATE"
End If
Else
Error 1000, "Unknown Operation ["+operation+"]"
End If
End If
End If

ExitFunction:
Me.Execute = result
Exit Function

processError:
Dim errMsg As String
If (lcSession.Status <> LCSUCCESS) Then
errMsg = "(LEI Error) " & lcSession.GetStatusText
lcSession.ClearStatus
Else
errMsg = Error$
End If

Print "Error on line " & Erl & ": " & errMsg
If lconODBC.IsConnected Then lconODBC.Disconnect

If lconNotes.IsConnected Then lconNotes.Disconnect
result = "ERROR"

Resume ExitFunction

End Function
'------------------------------------------------------------
LCConnection for the Notes DB is set from a profile document, MapByName = true and updateviews=true.

I've loaded the "uninserted" records into a spreadsheet along with the "inserted" records. The key values are present and I can see no problems with the other data fields.


Has anyone seen behavior like this?

Wayne






problem LCConnection insert into No... (Wayne A Sobers 5.May.11)
. . RE: problem LCConnection insert int... (Prasanna R Josh... 17.May.11)





  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