Re: help with microsoft ADO control/True DB Grid
- From: Drew <drew@xxxxxxxx>
- Date: Fri, 09 Sep 2005 10:49:39 -0400
Steve:
Went ahead and tried what I just mentioned in my replay. Works
perfectly. Since none of my five fields were unique, just added an
AutoNumber key and let it be the Primary Key.
No more problems.
Thanks very much!
Drew
On Fri, 9 Sep 2005 10:11:36 -0400, "Steve Byrne" <steveb@xxxxxxxxxx>
wrote:
>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
>>
>
.
- References:
- help with microsoft ADO control/True DB Grid
- From: Drew
- Re: help with microsoft ADO control/True DB Grid
- From: Steve Byrne
- help with microsoft ADO control/True DB Grid
- Prev by Date: Re: help with microsoft ADO control/True DB Grid
- Next by Date: Re: ADO Find Help?
- Previous by thread: Re: help with microsoft ADO control/True DB Grid
- Next by thread: Q: slow update
- Index(es):
Relevant Pages
|
|