vb6.0中的数据报表
我正在使用VB6中的数据报表,并尝试显示数据库中的图像。它检索图像,但为所有输出显示相同的图像 下面给出了我正在使用的代码vb6.0中的数据报表,vb6,report,Vb6,Report,我正在使用VB6中的数据报表,并尝试显示数据库中的图像。它检索图像,但为所有输出显示相同的图像 下面给出了我正在使用的代码 Dim rs As ADODB.Recordset, rs1 As ADODB.Recordset Dim a As String k = 0 i = 0 j = 0 k = 0 Set rs = New ADODB.Recordset With rs .CursorType = adOpenDynamic .LockType = adLockO
Dim rs As ADODB.Recordset, rs1 As ADODB.Recordset
Dim a As String
k = 0
i = 0
j = 0
k = 0
Set rs = New ADODB.Recordset
With rs
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.ActiveConnection = conn
.Source = "SELECT patientid FROM Inpatients_Maintenance WHERE (ModDate >= '" & frmDate & "') AND (ModDate <= '" & endDate & "')"
.CursorLocation = adUseClient
.Open
Do Until rs.EOF
If (rs.EOF = False And rs.BOF = False) Then
pid(i) = rs.Fields(0).Value
End If
i = i + 1
rs.MoveNext
Loop
End With
Set rs = Nothing
Set rs1 = New ADODB.Recordset
Dim id As String
With rs1
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.ActiveConnection = conn
For j = 0 To i - 1
id = pid(j)
.Source = "Select photo from patientImage where patientid='" & id & "'"
.CursorLocation = adUseClient
.Open
If (rs1.EOF = False And rs1.BOF = False) Then
p(j) = App.Path + "\patients\" + rs1.Fields(0).Value
a = p(j)
Set RptInpatientMaster.Sections("Section1").Controls("Image2").Picture = LoadPicture(a)
End If
.Close
Next j
End With
Dim rs为ADODB.Recordset,rs1为ADODB.Recordset
像线一样变暗
k=0
i=0
j=0
k=0
Set rs=New ADODB.Recordset
用rs
.CursorType=adOpenDynamic
.LockType=adlockType
.ActiveConnection=conn
.Source=“从住院患者维护中选择patientid,其中(ModDate>=”&frmDate&“)和(ModDate您是否只看到最后一个
Set RptInpatientMaster.Sections("Section1").Controls("Image2").Picture = LoadPicture(a)
你总是在报告中提到同一张图片,不是吗?你只看到最后一张吗
Set RptInpatientMaster.Sections("Section1").Controls("Image2").Picture = LoadPicture(a)
您的报告中总是提到同一张图片,不是吗?先生,请帮助我解决这个问题,我非常需要。谢谢。先生,请帮助我解决这个问题,我非常需要。谢谢