如何将lotus Notes文档中的附件如何通过SQL导入到ERP中?
1个回答
展开全部
导出:Call notesEmbeddedObject.ExtractFile( path$ )
导入:可以通过jdbc将刚才释放出来的附件转成比特流存到sql里
导入:可以通过jdbc将刚才释放出来的附件转成比特流存到sql里
追问
兄弟,能否将具体代码贴出来,小弟学习下?谢谢。
追答
Sub FileToBlob(ses As NotesSession,db As NotesDatabase,note As NotesDocument)
%REM
功能:通过ADO附件及正文归到ORACLE的BLOB字段中
qiumch 2008-10-28
%END REM
On Error Goto errorline
REM ----定义ADO----
Dim AdoCon As Variant
Dim AdoRs As Variant
Dim AdoStream As Variant
Dim ReadSize As Long
Dim BlockSize As Long
Dim FileLength As Long
Dim BlockNum As Long
Dim LeftBlock As Long
Dim sql As String
Dim object As notesEmbeddedObject
REM ----判断是否有附件与文件正文----
If Not note.HasItem("Body") Then
Msgbox "该文档无附件与文件正文!"
Exit Sub
End If
sFileName = ""
REM ----定义ADO----
Set AdoCon = CreateObject("ADODB.Connection")
Set AdoStream = CreateObject("ADODB.Stream")
Set AdoRs = CreateObject("ADODB.RecordSet")
AdoCon.ConnectionString = "Provider=OraOLEDB.Oracle; Data Source="_
+ "hbdx" + ";User ID="_
+ "contract" +";Password="_
+ "contract" + ";Persist Security Info=True"
AdoCon.Open
REM ----创建临时目录----
sTempDir = Curdir() & "\" & note.Universalid
If Dir$(sTempDir, 16) = "" Then
Mkdir sTempDir
End If
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询