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

RE: Error 12548: Error: Field count mismatch, Connector 'Oracle', Method - Insert -
Suresh VV Kumar 19.Apr.06 11:44 PM a Web browser
LC LSX Oracle Applications Connector - All Releases Windows NT


Hi Thomas,

Oracle metadata is accepting the Null values... I tried to set a null value using SetNull... Pls see below:

If Not Isnull(ora(7)) Then
Call ora(7).setNull(7, True)
End If

But its throwing "Instance Member SetNull not found" error... I checked the reference for LCFIELD properties & methods for SetNull... But i didn't find... What's wrong with this... Is there any classess need to include in the (Options)... Rightnow I am using "Uselsx "*lsxlc"" only...

And if try to use use NULL property of LCFIELD, its not accepting... Pls advice me... My code will looks likes below...

'--------------------------------------------------------------------------
(Options)
-----------
Option Public
Uselsx "*lsxlc"

'Constants for external DB information
Const DBTYPE = "Oracle"
Const DBHOST = "indiadev"
Const DBUSERID = "dev"
Const DBPWD = "test"
Const DBTABLE = "UPLOADSR"
Const DBFIELDS = "CREATED_BY, SUBJECT, STATUS, REQUEST_TYPE, DEPARTMENT, " &_
"SR_NO, TITLE, RF_NO, DATE_RECEIVED, SR_ASSIGN_DATE, SR_SPONSOR, " &_
"SR_REQ, SR_OWNER, PRIMARY_CONTACT_PERSON"

Initialize
---------

Sub Initialize
On Error Goto ErrorHandling

'Notes variables
Dim session As New NotesSession
Dim view As NotesView
Dim doc As NotesDocument
Dim strval(46) As String

'LcConnection variables
Dim lcsession As New LcSession
Dim src As New LcConnection(DBTYPE)
Dim keys As New LcFieldList
Dim fields As New LcFieldList
Dim field As LcField
Dim tmpdat As New LCDatetime
Dim title As LcField
Dim ora(46) As LcField
Dim result As Long

'Connect to Oracle DB
lcsession.clearstatus
With src
.server = DBHOST
.userid = DBUSERID
.password = DBPWD
.connect
.writeback = True
.metadata = DBTABLE
.fieldnames = DBFIELDS

End With
'Get view with all modified documents sorted by key value
Set view = session.CurrentDatabase.GetView("Upload1")

'For each Notes key doc, find matching Oracle document
For x = 1 To view.TopLevelEntryCount
Set doc = view.GetNthDocument(x)
While Not doc Is Nothing


'If edit field is blank, then add a value of one space -
'Oracle cannot update a field to Null
%REM
strval(0) = Cstr(doc.Subject(0))
If strval(0) = "" Then
strval(0) = " "
End If

%END REM

Set field = keys.append("TITLE", LCTYPE_TEXT)
field.flags = LCFIELDF_KEY
field.text = doc.TextTitle(0)
If (src.select(keys, 1, fields) = 0) Then
Print doc.TextTitle(0) & ": TITLE value not found, skipping record."
Call keys.Remove(1)
Goto endloop
End If
Set title = fields.lookup("TITLE")
Set ora(0) = fields.lookup("SUBJECT")
Set ora(1) = fields.lookup("STATUS")
Set ora(2) = fields.lookup("REQUEST_TYPE")
Set ora(3) = fields.lookup("DEPARTMENT")
Set ora(4) = fields.lookup("SR_NO")
Set ora(5) = fields.lookup("CREATED_BY")
Set ora(6) = fields.lookup("RF_NO")
Set ora(7) = fields.lookup("DATE_RECEIVED")

'Write Status field to Oracle doc and save
' If (src.fetch(fields) > 0) Then

ora(0).text = doc.Subject(0)
ora(1).text = doc.Status(0)
ora(2).text = doc.TypeofReq(0)
ora(3).text = doc.TextDepartment(0)
ora(4).text = doc.TextSR(0)
ora(5).text = doc.TextCreatedBy(0)
ora(6).text = doc.TextRf(0)

If Not Isnull(ora(7)) Then
Call ora(7).setNull(7, True) 'Getting the error in this line...
End If

result = src.update(fields)


'Remove key values for next loop iteration
Call keys.Remove(1)
Call fields.Remove(2)
Call fields.Remove(1)

Set doc = view.GetNextDocument(doc)
Wend
endloop:
Next

Print "Total records processed: '" & x & "'."

'Print "Agent successfully completed."

RoutineExit:
Exit Sub

ErrorHandling:
Print "Error" & Err & ": " & Error$ & "(myAgent, Initialize)"
Resume RoutineExit
End Sub

Pls help me to solve this problem...

Thank you
Suresh




Error 12548: Error: Field count mis... (Suresh VV Kumar... 7.Apr.06)
. . RE: Error 12548: Error: Field count... (Thomas Kennedy 7.Apr.06)
. . . . RE: Error 12548: Error: Field count... (Suresh VV Kumar... 10.Apr.06)
. . . . . . RE: Error 12548: Error: Field count... (Thomas Kennedy 10.Apr.06)
. . . . . . . . RE: Error 12548: Error: Field count... (Suresh VV Kumar... 11.Apr.06)
. . . . . . . . . . RE: Error 12548: Error: Field count... (Thomas Kennedy 11.Apr.06)
. . . . . . . . . . . . RE: Error 12548: Error: Field count... (Suresh VV Kumar... 11.Apr.06)
. . . . . . . . . . . . . . RE: Error 12548: Error: Field count... (Thomas Kennedy 12.Apr.06)
. . . . . . . . . . . . . . . . RE: Error 12548: Error: Field count... (Suresh VV Kumar... 17.Apr.06)
. . . . . . . . . . . . . . . . RE: Error 12548: Error: Field count... (Suresh VV Kumar... 19.Apr.06)
. . . . . . . . . . . . . . . . . . RE: Error 12548: Error: Field count... (Thomas Kennedy 26.Apr.06)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


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

Sign In or Register

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

Member Tools


RSS Feeds

 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