what am i doing wrong 
Author Message
 what am i doing wrong

..........using Clarion 5bee ABC........

I have a browse list which contains order entries, and I've Edit-In-Place
turned off.  On this browse I have a button.  I'm trying to place some
embeded code on the button so I can basically say "If the STATUS of the
order = 6, then change the status to 15.  But when I try and do this I get
the FILE USAGE ERROR.  Is this because I have edit-in-place turned off?  Or
is it probably my coding.

!SOFT DELETE
 if BOK:STATUS = 6

    bok:status = 15
    access:book1.update()
 else
    message('cant do!!!')

 end

Any suggestions would be very helpful,
 Do I need to an accept command before i try am update

Ken O Brien



Fri, 31 May 2002 03:00:00 GMT  
 what am i doing wrong
before you can

Quote:
>     access:book1.update()

you must do a successful fetch or next

     access:book1.fetch()
     access:Book1.next()

The browseclass.updateviewrecord method does the fetch for you based on the
selected record so you need something like

 brw1.updatebuffer() !moves selected browse Q item into bok record buffer or
you could just check the brw1.Q:status field instead
  if bok:status = 6   !check status
  brw1.UpdateViewRecord() !reget the record so you can update it
  bok:status = 15
  Access:Book1.update()

--
John

Quote:
> I have a browse list which contains order entries, and I've Edit-In-Place
> turned off.  On this browse I have a button.  I'm trying to place some
> embeded code on the button so I can basically say "If the STATUS of the
> order = 6, then change the status to 15.  But when I try and do this I get
> the FILE USAGE ERROR.  Is this because I have edit-in-place turned off?
Or
> is it probably my coding.

> !SOFT DELETE
>  if BOK:STATUS = 6

>     bok:status = 15
>     access:book1.update()



Fri, 31 May 2002 03:00:00 GMT  
 what am i doing wrong
Quote:

> FILE USAGE ERROR.  Is this because I have edit-in-place turned off?  Or
> is it probably my coding.

> !SOFT DELETE
>  if BOK:STATUS = 6

>     bok:status = 15
>     access:book1.update()

Is the file open and has access:file.UseFile() been called? Please post
the exact error message.
Look in the generated source. Is there a UpdateViewRecord before the
embed code?  Update() is a put so you need to do a get() first.
UpdateViewRecord does that for you.
-------
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com


Fri, 31 May 2002 03:00:00 GMT  
 what am i doing wrong
Hi John,

You should issue a BrowseBook1.UpdateViewRecord() before test of BOK:Status.

Goran Lazic


Quote:

> ..........using Clarion 5bee ABC........

> I have a browse list which contains order entries, and I've Edit-In-Place
> turned off.  On this browse I have a button.  I'm trying to place some
> embeded code on the button so I can basically say "If the STATUS of the
> order = 6, then change the status to 15.  But when I try and do this I get
> the FILE USAGE ERROR.  Is this because I have edit-in-place turned off?
Or
> is it probably my coding.

> !SOFT DELETE
>  if BOK:STATUS = 6

>     bok:status = 15
>     access:book1.update()
>  else
>     message('cant do!!!')

>  end

> Any suggestions would be very helpful,
>  Do I need to an accept command before i try am update

> Ken O Brien



Sat, 01 Jun 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. What am I doing wrong!

2. What am I doing wrong?

3. Stupid newb question: What am I doing wrong?

4. What am I doing Wrong

5. Help - What am I doing wrong

6. Saving a Variable to a field in a record- what am i doing wrong

7. What am I doing wrong?

8. What am I doing wrong?

9. #CONTROL What am I doing wrong

10. What am i doing wrong.

11. What am I doing wrong?

12. Clarion 5.5 What am I doing wrong????

 

 
Powered by phpBB® Forum Software