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 ReleasesWindows 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"
'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