Hi,
I am pushing data fro Lotus Notes to Oracle 10g. The code works fine for the 1st document, then it throws an error “Error: Field Count Mismatch”. I am pasting the code here, any help will be highly appreciated.
Sub Initialize
Dim db As NotesDatabase
Dim view As NotesView
Dim currentPartView As NotesView
Dim doc As NotesDocument
Dim x As String
Dim y As String
Dim z As String
Dim i As Integer
Dim lccon As LCConnection
Dim lc_column1 As LCField
Dim lc_column2 As LCField
Dim lc_column3 As LCField
Dim statement As String
Dim lcresultfieldlist As New LCFieldList (3)
i = 0
Dim session As New NotesSession
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Set View = db.GetView( “TestV” )
Set doc = View.GetFirstDocument
Set lccon = New LCConnection(“oracle”)
With lccon
.server = “test”
.Metadata = “LC_TEST”
.Userid = “test”
.Password = “test”
End With
lccon.Connect
statement = |
SELECT * FROM LC_TEST
|
'Set lcresultfieldlist = New LCFieldList
Do Until doc Is Nothing
Set lc_column1 = lcresultfieldlist.Append (“PRIORITY” , LCTYPE_TEXT)
x = Cstr(doc.Test1(0))
lc_column1.value = x
Set lc_column2 = lcresultfieldlist.Append (“CATEGORY”, LCTYPE_TEXT)
y = Cstr(doc.Test2(0))
lc_column2.value = y
Set lc_column3 = lcresultfieldlist.Append (“PROBLEM_HEADING” , LCTYPE_TEXT)
z = Cstr(doc.Test3(0))
lc_column3.value = z
Call lccon.Insert (lcresultfieldlist,1,i)
Set doc = View.GetNextDocument(doc)
i = i +1
Loop
DisconnectClean:
lccon.Disconnect
Exit Sub
End Sub