一个数据库的问题...两天了..快疯了..
VB6.0+SQL2000数据库连接上后取数一直为空,数据库内有内容....代码如下..
Private Sub Command4_Click()
Dim TmpStmt As String
TmpStmt = "select * from StuDB.dbo.StuT"
OdbcExt (TmpStmt)
Do While SQLFetch(Hstmt) <> SQL_NO_DATA_FOUND
ColVal = String(400, 0)
Rc = SQLGetData(Hstmt, 1, 1, ColVal, Lench(ColVal), pcblen)
MsgBox Trim(ColVal)
Loop
End Sub
MsgBox返回为空值