BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Urgent please: MS-SQL UPDATE WHERE Doesn't work

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Alexander Muylaert
Guest





PostPosted: Wed Apr 28, 2004 12:34 pm    Post subject: Urgent please: MS-SQL UPDATE WHERE Doesn't work Reply with quote



Hi

I have a prepared ado query. It contains the following simple statement

UPDATE [CUSTOMERS]
SET
[Country] = :Country_1,
[Zip] = :Zip_1
WHERE
([ID] = :ID) AND
([Country] <> :Country_2 OR [Zip] <> :Zip_2)

This doesn't seem to work. The updated rowcount is always 0.
According to one of my fellow developers, this has something to do with the
value of the fields beïng fetched/replaced early.

Anybody has an idea?

Kind regards

Alexander


Back to top
Alexander Muylaert
Guest





PostPosted: Wed Apr 28, 2004 12:48 pm    Post subject: Re: Urgent please: MS-SQL UPDATE WHERE Doesn't work Reply with quote



okay

I figuered it out

ZIP contained the value NULL.

Kind regards

Alexander


"Alexander Muylaert" <ask (AT) hotmail (DOT) com> wrote

Quote:
Hi

I have a prepared ado query. It contains the following simple statement

UPDATE [CUSTOMERS]
SET
[Country] = :Country_1,
[Zip] = :Zip_1
WHERE
([ID] = :ID) AND
([Country] <> :Country_2 OR [Zip] <> :Zip_2)

This doesn't seem to work. The updated rowcount is always 0.
According to one of my fellow developers, this has something to do with
the
value of the fields beïng fetched/replaced early.

Anybody has an idea?

Kind regards

Alexander





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.