我用了一个ado控件,我想用代码把数据绑定到textbox,代码如下Set dateTx.DataSource = Adodc1.Recordset
dateTx.DataField = Adodc1.Recordset.Fields("date")
...............
但run时显示: run time error '545':unable to bind to fields :'2004-4-17''2004-4-17'是我date中第一个valuehow come like this? help
dateTx.DataField = Adodc1.Recordset.Fields("date")
...............
但run时显示: run time error '545':unable to bind to fields :'2004-4-17''2004-4-17'是我date中第一个valuehow come like this? help
strsql = "select * from table where ----------- "
Adodc1.ConnectionString = ConnectString
Adodc1.CursorLocation = adUseClient
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = strsql
Adodc1.Refresh
'---------------可改成过程,方便以后调用。
Set dateTx.DataSource = Adodc1
dateTx.DataField = Adodc1.Recordset.Fields(2).Name
应该是这样,不过手边没有VB环境,没试!!