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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Grid with Ado Connectivity - No help Available!!

Status
Not open for further replies.

fawaz

Programmer
Mar 3, 2001
16
IN
I think there is a problem with datagrid working with Ado connectivity. A lot of forms (please search with key words "DataGrid Ado") remain unanswered.(any way help!)Anybody can throw light on this dark side. Thanks.
 
For example I have a datagrid connected a table in Access 97 through ADO data control(adodcfeedetail). I have text fields connected to other table through a Ado data control (adofeemaster). Whenever the textfilds change I fetch a different set of records for datagrid. please see my below codes:

Private Sub AdoFeeMaster_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

If AdoFeeMaster.Recordset.EOF Then
AdoFeeMaster.Recordset.MoveLast
End If
If AdoFeeMaster.Recordset.BOF Then
AdoFeeMaster.Recordset.MoveFirst
End If
txtfields(24).Text = AdoFeeMaster.Recordset.Fields!(fee_mstr_recno]
AdodcFEEDETAIL.CommandType = adCmdText
AdodcFEEDETAIL.RecordSource = "select * from fee_detail_trans where [FEE_DETAIL_RECNO]= " & txtfields(24).Text & ""
AdodcFEEDETAIL.Refresh
DataGrid1.Refresh
End Sub

This command fetch and display records whenever txtfields change. But when I add new records at AdoFeemaster and update, it does not have any records in adodcfeedetail so it is not showing any records in datagrid. Fine. But it is not allowing me to add new new rows in datagrid (adding new records in underlying tables) giving error 'current row set not available'.

please extend your help. Thanks
 
What happens when you try your Sql expression in Access? Does it return any rows? Have you tried that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top