Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adodc Question

Status
Not open for further replies.

MALICKA

Programmer
Oct 16, 2002
46
HK
I am trying to get the detail of quotation in datagrid
by creating ADO datagrid control
But i am getting error

Run time error
object required

Set Adodc1.Recordset = rs
I can't set the record set at run time

code....
Private Sub ShowDetail()
Dim rs As ADODB.Recordset
Dim n As Integer
Set rs = do2.CreateRecordSet("SELECT IND_SEQ_NO, IND_REF, IND_SP_NO, IND_SP_DES, IND_QTY, IND_U_PRC FROM TXINVDTF WHERE IND_INV_NO = '" & txtfield(0) & "' ORDER BY IND_SEQ_NO")
Set Adodc1.Recordset = rs
row_count = do2.RecordCount("SELECT COUNT(*) FROM TXINVDTF WHERE IND_INV_NO = '" & txtfield(0) & "'")
Adodc1.Refresh
GridColumnSize
GridColumnName
GridColumnFormat
rs.Close
End Sub
 
I am new to Ado can any one help me how to bind the adodc to datagrid at run time

Even i try to use the data grid without adodc still i could not get the information on datagrid

Set DataGrid1.DataSource = rs
DataGrid1.Refresh

i get error rowset is not book markable any idea

Any help is highly appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top