Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.paradox    |    To crash or not to crash, asks Borland    |    9,834 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 8,440 of 9,834    |
|    Liz McGuire to Kenneth    |
|    Re: Unlocking problem...    |
|    09 Apr 07 19:09:36    |
   
   From: liz@paradoxcommunity.com   
      
   Don't open and attach - one or the other.   
      
   Liz   
      
      
   Kenneth wrote:   
   >   
   > Hi Liz,   
   >   
   > The form has a field called "Viewed" that displays the date.   
   > I assume (perhaps incorrectly) that this field would qualify   
   > as "bound to the table with the field" I want to update.   
   >   
   > I have a field to which the cursor moves when the form   
   > opens, and have this code on it:   
   >   
   >   
   > method arrive(var eventInfo MoveEvent)   
   > var   
   > tc1 tCursor   
   > Viewed uiObject   
   > endVar   
   >   
   >   
   > if not tc1.open (":DATA: demograf.db") then errorShow()   
   > endIf   
   > if not tc1.attach(Viewed) then errorShow() endif   
   > if not tc1.edit() then errorShow() endif   
   > tc1.Viewed = today()   
   > if not tc1.endEdit() then errorShow() endif   
   > if not tc1.close() then errorShow() endIf   
   > endMethod   
   >   
   > When the code fires, I get the error that I am attempting to   
   > use an unassigned variable. The error points to the line:   
   >   
   > "if not tc1.attach(Viewed) then errorShow() endif"   
   >   
   > I don't see why that line is generating the error, and would   
   > certainly welcome any help you can offer.   
   >   
   > Sincere thanks,   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca