ActiveConnection = mAdoConn mAdoRst.Open SqlText, , adOpenStatic, adLockReadOnly 'Open recordset. Exit Sub Error_handler: Call HandleError End Sub Private Sub ReadFromDB(fld As ADODB.Field, ByVal DiskFile As String, _ FldSize As Long) Dim NumBlocks As Integer Dim LeftOver As Long Dim byteData() As Byte '字节数组,用于长的可变二进制数据LongVarBinary。 Dim strData As String '字符串,用于长的可变二进制数据LongVarChar。 Dim DestFileNum As Integer Dim pic As Variant Dim i As Integer '********************************************************** '作用:提取二进制数据并把数据放入文件。 '输入:图片字段,文件名/位置和数据尺寸。 '********************************************************** If Len(Dir(DiskFile)) > 0 Then '删除已经存在的目标文件。 页码:[1] [2] [3] [4] [5] [6] [7] [8] [9] 第8页、共9页 |