Re: help with microsoft ADO control/True DB Grid



Do you have a Primary Key on the table? Is that Primary key included in the
results you bring down to the Grid? If not, that is the problem. ADO needs
to have a primary key (not just a column with unique values) in the result
set to work properly.
"Drew" <drew@xxxxxxxx> wrote in message
news:4jv2i192vmskkv4nt3jhvlb1p4rhunolht@xxxxxxxxxx
> Hi All:
>
> I have a simple VB6 project that allows a user to simply read and
> update data from a table that is in an Access 2003 database.
>
> The form of my project has the ADO data control and a True DBGrid OLE
> 8.0 Control on it.
>
> I've set the ADODC connection string to Driver={Microsoft Access
> Driver (*.mdb)};Dbq=p:\drew\stormlog\storm2.mdb;Uid=Admin;Pwd=;
>
> and I've set the recordsource to select * from stormlog
>
> The grid has ADODC1 selected as its data source. The grid is loaded
> fine and data is displayed and can be browsed thru.
>
> In some cases, I can change data in a column and move off of the
> record and its updated as one would expect.
>
> The problem is that about 1 out of every 5 records can't be updated
> via the grid. On those records, when I move off of the record after
> changing a field's value, I get this error:
>
> Row cannot be located for updating. Some values may have been changed
> since it was last read.
>
> The only value that has changed is the one I changed in the grid.
> Although the database is on a network drive that I can read/write to,
> no other network users have the database open, so its not a record
> lock issue.
>
> Again, most records can be updated but seems like about every fifth
> one generates this error message.
>
> I don't have any AutoNumber fields in the table. Its a pretty simple
> table with 5 fields.
>
> Any help is appreciated as I'm stumped!
>
> Thanks
> Drew
>


.



Relevant Pages

  • help with microsoft ADO control/True DB Grid
    ... I have a simple VB6 project that allows a user to simply read and ... The grid has ADODC1 selected as its data source. ... Although the database is on a network drive that I can read/write to, ... I don't have any AutoNumber fields in the table. ...
    (microsoft.public.data.ado)
  • Re: help with microsoft ADO control/True DB Grid
    ... I don't have a Primary Key defined at all as I ... >> update data from a table that is in an Access 2003 database. ... >> The form of my project has the ADO data control and a True DBGrid OLE ... >> The grid has ADODC1 selected as its data source. ...
    (microsoft.public.data.ado)
  • Re: help with microsoft ADO control/True DB Grid
    ... AutoNumber key and let it be the Primary Key. ... >> update data from a table that is in an Access 2003 database. ... >> The grid has ADODC1 selected as its data source. ...
    (microsoft.public.data.ado)
  • Custom Paging in asp.net Datgrid Using Sql
    ... I have written A SP in SQL which will be used to Bind the grid. ... prev(<) and next>on grid. ... When User clicks on Nextbutton,Sp_fill builds a querry like ... StartIndex is the Value of Primary key of last record on the current ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Custom Paging in asp.net Datgrid Using Sql
    ... Here is a solution to dynamically return a sort result set back. ... CREATE TABLE #FileDownLoadJobs ... RowID INT IDENTITY NOT NULL PRIMARY KEY, ... I have written A SP in SQL which will be used to Bind the grid. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)