Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP3 Insert Into woes
Message
De
04/09/1998 10:47:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00133223
Message ID:
00133304
Vues:
12
>>>>>How do I determine if an insert into was successful.
>>>>>
>>>>>I seem to be missing some records when I do this, yet the application does not appear to generate any errors.
>>>>>
>>>>>I used to use append blank loop, forcing a lock prior to the append.
>>>>>I like the speed of insert into, hoewever if it is going to fail and not let me know....
>>>>>
>>>>>Mike
>>>>Mike,
>>>>Insert into normally doesn't fail where append blank succeed. Might it be you're not tableupdating (tableupdate is failing for some reason) or index is corrupted and transaction is in progress ?
>>>>Cetin
>>>
>>>A liitle more detail and a code snippet,
>>>Application has a cursor that stores the results of the jobs to print. (JOBSTOPRINT)
>>>A unique number is added to this cursor.
>>>This cursor is then placed into the main table with the insert into on record at a time
>>>
>>>inc is a procedure that adds one to the number passed to it.
>>>The original startno is taken from a table that tracks the number.
>>>
>>>sele JOBSTOPRINT
>>>** add work order number to scan
>>>** update the workordr table with values
>>>scan
>>> m.startno=inc(m.startno,'')
>>> wo_num="P"+alltrim(m.plant)+right("00000000"+alltrim(str(m.startno)),8)
>>> replace wo_number with wo_num
>>> scatter memvar memo
>>> m.wo_catgory='3'
>>> insert into workordr from memvar
>>> FLUSH
>>>endscan
>>>
>>>What follows after the above code, is a report based on the results in JOBSTOPRINT.. Prints Work Orders
>>
>>scan
>> m.startno=inc(m.startno,'')
>> m.wo_num="P"+alltrim(m.plant)+padl(m.startno,8,"0")
>> replace wo_number with m.wo_num
>> scatter memvar memo
>> m.wo_catgory='3'
>> insert into workordr from memvar
>>endscanMichael just changed for my eyes. What is the real problem. What do you miss. Here what I get you copy recs from jobstoprint to workordr table changing wo_number and catgory and there is no buffering. Is it what you really intend to do ?
>>Cetin
>
>
>Yes, that is all i am trying to do.
>
>What is happening, on occasion, (not always!) is it will print out the jobs properly, but the workordr table will not have all of the records...
>
>i.e. if I were to be printing wo_numbers from 1-10, the report would print all ten, but the workordr table would only have records 1-4, 6,7, 9, 10 for example. (5 and 8 would be missing.)
>
>Mike
Mike,
Occasional ones are hard to reveal. So silly guesses might help sometimes. Hmm "set deleted" changing in between and user might have pressed Ctrl+T for 5 and 8 ?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform