custsoft
Programmer
- Aug 29, 2000
- 41
I use VB6, ADO 2.5. I have an ADO data control and a datagrid. Originally, the connection string and the record source properties were in the data control and things worked fine. I changed the connection string and record source to be set by the program. Now the first cell of the datagrid is empty when the database field is not. I suspect the connection string but it looks the same as what was in the data control property. Following is the code that I use in the program:
Dim rs As New ADODB.Recordset
rs.Open "select * from addresschg", TaxCN, adOpenStatic, adLockOptimistic
frmBrowse.adodcBrowse.CommandType = adCmdText
Set frmBrowse.adodcBrowse.Recordset = rs
frmBrowse.Show vbModal
TaxCn is the connection string.
I saw a reference to this problem in another question but no solution was given. Has anyone run into this? Thanks for your help. Joe
Dim rs As New ADODB.Recordset
rs.Open "select * from addresschg", TaxCN, adOpenStatic, adLockOptimistic
frmBrowse.adodcBrowse.CommandType = adCmdText
Set frmBrowse.adodcBrowse.Recordset = rs
frmBrowse.Show vbModal
TaxCn is the connection string.
I saw a reference to this problem in another question but no solution was given. Has anyone run into this? Thanks for your help. Joe