Re: adCriteriaAllCols and text columns

From: Vitali Kalinin (vitkalinin_at_yahoo.com)
Date: 04/20/04


Date: Tue, 20 Apr 2004 15:40:19 +0300

The text, ntext, and image data types cannot be compared or sorted, except
when using IS NULL or LIKE operator (assuming that we are talking about MS
SQL). To address this problem you can add TIMESTAMP column into table.

Regards,

Vitali

"John Faris" <johnfaris@nospam.hotmail.com> сообщил/сообщила в новостях
следующее: news:4084f578$2@newsgroups.borland.com...
> Hi all.
>
> Quite often we come across the situation where a user will type some notes
> into a record at the exact same time that another user decides to do the
> same thing at the same time. With the BDE one of the users would have got
> an error back about another user changing the record. However, with ADO
we
> don't see the same thing. I've figured out this is because ADO defaults
to
> using an Update statement containg only the modified fields in the where
> clause whereas the BDE would use all columns in the where clause. I read
> that you can get around this by the following code in the beforepost and
> beforedelete events AdoQuery1.Properties['Update
> Criteria'].Value:=adCriteriaAllCols;
>
> This does indeed populate the where clause with all columns but with the
> exception of sql server text columns. So what happens is user1 changes
the
> notes and posts the changes whilst user2 is looking at the original notes.
> Then user2 decides to add to the notes and posts them. They don't get an
> error as ado has not included the text column in the where clause of the
> update statement. What can be done to get around this problem?
>
> TIA.
>
> John.
>
>



Relevant Pages

  • adCriteriaAllCols and text columns
    ... I've figured out this is because ADO defaults to ... clause whereas the BDE would use all columns in the where clause. ... Then user2 decides to add to the notes and posts them. ...
    (borland.public.delphi.database.ado)
  • Re: Deleting Multiple Rows
    ... Yes - AND - being *able* to put it in the WHERE clause is very different ... updates, and deletes) are cached. ... was to create a loop in my application - wrap the loop in an ADO ... the lesser evil relative to the old nasty ADO .UpdateBatchmethod... ...
    (microsoft.public.sqlserver.programming)
  • Re: dataset columns with system.dbnull
    ... I'd try putting any of the ntext/text or image data types ... at the end of your select clause. ... Robbe Morris - 2004/2005 Microsoft MVP C# ...
    (microsoft.public.dotnet.framework.adonet)
  • ADO corrupts date time values in where clause
    ... talking to an Oracle database. ... Also in some cases the time component seems to be offset by 10 secs ... ado passes 00:00:10 in the where clause. ...
    (microsoft.public.data.ado)
  • DataAdapter returns 0 results, what am I doing wrong?
    ... I'm using ADO .NET to connect to a Microsoft Access database, ... LIKE clause to send queries through ADO? ...
    (microsoft.public.dotnet.languages.vb)