Home > Software engineering >  VB6 TDBGrid data binding without the data
VB6 TDBGrid data binding without the data

Time:10-13

'On Error GoTo Msg
Dim rsTemp As New ADODB library. You, rsTempTotal As New ADODB. You

Dim strSql As String
Dim conn As New dataconn
Dim As Long I
Dim As Integer k

TDBGrid2. EditActive=False
TDBGrid2. MarqueeStyle=4
TDBGrid2. AllowUpdate=False

RsTemp. CursorLocation=adUseClient
StrSql="EXEC STKD_P_LIST 1"
Conn. Execute strSql
The Set rsTemp=conn. You
The Set TDBGrid2. The DataSource=rsTemp
K=rsTemp. RecordCount

The Exit Function
Msg:
MsgBox Err. Description, vbCritical, "tip"
K there are number of rows, prove that there are data, such as 3
But after binding line display 3 blank, no display data,
Don't know where there is something wrong with the Settings

  • Related