Private mAdoConn As New ADODB.Connection Private mAdoRst As New ADODB.Recordset Private mstrDbName As String Private mstrTableName As String Private mstrImageColumnName As String '图片字的名称。 Private mstrImageTypeColumnName As String '图片类型字段的名称。 Private mstrImageIdColumnName As String '图片ID字段的名称。 Private mstrFileName() As String '数组,里面包含文件名和路径。 Private mlngImageId() As Long '数组,里面包含图片ID Private mlngNumberOfFiles As Long Const BLOCKSIZE = 102400
Public Property Let DbName(ByVal strVal As String) mstrDbName = strVal End Property
Public Property Let TableName(ByVal strVal As String) mstrTableName = strVal End Property
Public Property Let NameOfImageColumn(ByVal strVal As String) mstrImageColumnName = strVal End Property
Public Property Let NameOfImageTypeColumn(ByVal strVal As String) mstrImageTypeColumnName = strVal End Property
Public Property Let NameOfImageIdColumn(ByVal strVal As String) mstrImageIdColumnName = strVal End Property
Public Property Get ImageFile(ByVal ImageId As Integer) As String Dim intPos As Integer Dim blnFindId As Boolean Dim i As Integer
blnFindId = False For i = 0 To mlngNumberOfFiles - 1 If mlngImageId(i) = ImageId Then intPos = 5 + Len(ImageId) + 3 Ima