Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


A problem with DataGrid bound with Adodc

A problem with DataGrid bound with Adodc

A problem with DataGrid bound with Adodc

I bound DataGrid with Adodc. DataGrid has enabled AllowUpdate, AllowDelete etc. When an adodc.recordset isn't empty (table has records) everything works fine. However, if that recordset is empty (BOF, EOF = true, table in database has no records) I can't fill row in DataGrid to add new (first) record. In addition it occurs only sometimes and I couldn't catch what's the reason. I've heard that similar problems occurs in RDO, too.

The message i get from dataGrid is: "The current row is unavailable"

Question: How to solve this problem?


RE: A problem with DataGrid bound with Adodc

Are you talking about manual entry of the first row (typing in the row with * in the row marker at the left)?

Fiddling with the ADODC's Recordset property to do this programmatically is sort of silly. For that you normally just skip using ADODCs anyway. But I can't think of why an .AddNew wouldn't work.

Tested, works fine here!


Private Sub mnuDink_Click()
    'Field 0 is an autonumber ID field:
    Adodc.Recordset.AddNew Array(1, 2, 3, 4), Array("x", "y", "z", "w")
End Sub 

You must have something else going on.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close