Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to solve this problem?
Message
From
01/11/2000 21:23:29
 
 
To
01/11/2000 20:08:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00436556
Message ID:
00436987
Views:
28
Hi Usha,

You told me yesterday that the current table is 'land', OK?

When VFP executes the first instruction:
vlocation = location_code

VFP stores the field location_code from table 'land' into variable vlocation.

And now, if you take the next sentence:
IF vlocation != land.location_code

They will never be different because record pointer still is on the same record of table 'land'

That condition always returns FALSE and you will always see the error form.

Please tell me one more thing:
Which values do 'WAIT WINDOW command' show you?
I bet it always show you the same value, otherwise you are not including the whole code here.

Also, you say that you insert other record, Where are you doing it?

I will wait for details.

Juan Carlos.



>Hi,
>I was tried to use this command but it still read the first record in a table. I mean, if the data is already exist in database, error form will display when I insert the same data.
>
>But when I insert the other record (location code) except the first record,the command cannot read and the error form not display.
>
>WAIT WINDOW location_code
>vlocation = location_code
>USE ("c:\mine\land.dbf")
>WAIT WINDOW land.location_code
>IF vlocation != land.location_code
> DO FORM ("c:\mine\land.scx")
>ELSE
> DO FORM ("c:\mine\errorcode.scx")
>ENDIF
>RELEASE thisform
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform