hi,
i have read andre’s article and tried to push files which is stored in disk (after detaching from notes document using embedded object class).
am trying to read the file contents uisng “file” connector, but field list is not getting populated, i get “object variable not set” error.
here is my code …
Any help greatly appreciated … andre … as you said in email, i have posted query in forum … look forward to your help/reply.
many Thanks
-Anand Kannan.
==============
Sub Initialize
Dim lcora As LCConnection
Dim lcfile As LCConnection
Dim fldlistora As LCFieldList
Dim fldlistfile As LCFieldList
Dim fldattid As LCField
Dim fldattname As LCField
Dim fldattdata As LCField
Set lcora = New LCConnection ("ORACLE")
Set lcfile = New LCConnection("file")
Set fldattid = New LCField(LCTYPE_INT)
Call fldattid.SetInt(1, 1001)
Set fldattname = New LCField(LCTYPE_TEXT)
Set fldattdata = New LCField(LCTYPE_BINARY)
Set fldlistora = New LCFieldList(1)
Call fldlistora.IncludeField(1, fldattid, "att_id")
Call fldlistora.IncludeField(2, fldattname, "att_name")
Call fldlistora.IncludeField(3, fldattdata, "att_data")
lcFile.Database = "g:\LCAttachments" 'set file connector to use new directory.
lcFile.Metadata = "CallReport"
lcFile.Binary = True ' the files we're working with are binary
lcora.MapByName = True
lcora.server = "XE"
lcora.userid = "system"
lcora.password = "password"
lcora.Metadata = "ATT_TEST"
lcfile.Connect
'lcfile.Action(LCACTION_TRUNCATE) ' delete all file in temp dir first ...
lcora.Connect
Msgbox "connected to ora"
'Call lcora.Select(Nothing, 1, fldlistora)
Call lcFile.Select(Nothing, 1, fldlistfile)
'Call lcFile.Fetch(fldlistfile)
'Call fldlistora.MapName(fldlistfile, "Filename,Contents", "att_name,att_data")
'Call fldlistora.IncludeField(3, fldattid, "att_id")
Do While lcFile.Fetch(fldlistfile)
Set fldattname = fldlistfile.Lookup("FileName")
Set fldattdata = fldlistfile.Lookup("Contents")
Call lcora.Insert(fldlistora)
Loop
End Sub
==============