🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2791

Re: Editing records

#2791
From: Viatcheslav V. Vassiliev
Date: Mon, 17 Mar 2003 12:17
96 lines
4464 bytes
Yes. On client-side cursor (CursorLocation = clUseClient) ADO makes updates
by executing SQL commands like

UPDATE TableName SET Col1 = NewValue WHERE Col1 = OldCol1Value AND Col2 =
OldCol2Value ...

In case you have no primary key and have rows with same values in all
columns ADO can not locate row you want to update. Having primary key should
solve your problem.

----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.

"Borut Sustar" <borut@bokosoft.si> �������/�������� � �������� ���������:
news:3e75a614@newsgroups.borland.com...
>
> No!Should i have it?
> Borut
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> news:3e74b678@newsgroups.borland.com...
> > Do you have primary key (or at least unique index) on this table?
> >
> > ----------------------------------------------------------------
> > Regards,
> > Viatcheslav V. Vassiliev
> > http://www.oledbdirect.com
> > The fastest way to access MS SQL Server, MS Jet (MS Access)
> > and Interbase (through OLEDB) databases.
> >
> > "Borut �u�tar" <borut@bokosoft.si> �������/�������� � ��������
���������:
> > news:3e749aab@newsgroups.borland.com...
> > > Error : 'ROW CANNOT BE LOCATED FOR UPDATING. SOME VALUES MAY HAVE
> CHANGED
> > > SINCE IT
> > > WAS LAST READ'.
> > >
> > > "Borut �u�tar" <borut@bokosoft.si> wrote in message
> > > news:3e749a74@newsgroups.borland.com...
> > > > I can add (read only=false) records and delete them, but when i try
to
> > > > change them an error is thrown!
> > > >
> > > >
> > > >
> > > > "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in
message
> > > > news:3e72e342@newsgroups.borland.com...
> > > > > You should be able to edit record with these settings. Check
> > > > > TADOTable.ReadOnly property.
> > > > >
> > > > > ----------------------------------------------------------------
> > > > > Regards,
> > > > > Viatcheslav V. Vassiliev
> > > > > http://www.oledbdirect.com
> > > > > The fastest way to access MS SQL Server, MS Jet (MS Access)
> > > > > and Interbase (through OLEDB) databases.
> > > > >
> > > > >
> > > > > "Borut �u�tar" <borut@bokosoft.si> �������/�������� � ��������
> > > ���������:
> > > > > news:3e723546@newsgroups.borland.com...
> > > > > > Hello!
> > > > > >
> > > > > > I am using MSSQL, BCB6,ADO! Why isn't possible to edit records
if
> > this
> > > > > > settings are used:
> > > > > > -cursorLocation = clUserClient
> > > > > > -Cursor Type = ctDynamic
> > > > > > -Lock Type = ltOptimistic
> > > > > > -Table direct = true;
> > > > > > What settings should I use, to make it possible to edit records
> > (Table
> > > > > which
> > > > > > i am trying to edit is on local computer)!
> > > > > >
> > > > > > Thx in advance!
> > > > > > Borut
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <3e75f73e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3e723546@newsgroups.borland.com> <3e72e342@newsgroups.borland.com> <3e749a74@newsgroups.borland.com> <3e749aab@newsgroups.borland.com> <3e74b678@newsgroups.borland.com> <3e75a614@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,ceee7eda211f906d
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-03-17 08:39:56 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e723546@newsgroups.borland.com> <3e72e342@newsgroups.borland.com> <3e749a74@newsgroups.borland.com> <3e749aab@newsgroups.borland.com> <3e74b678@newsgroups.borland.com> <3e75a614@newsgroups.borland.com>
Subject: Re: Editing records
Date: Mon, 17 Mar 2003 15:17:20 +0300
Lines: 98
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.247.201.57
Message-ID: <3e75f73e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047918398 213.247.201.57 (17 Mar 2003 08:26:38 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail