Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't Append!
Message
From
21/01/2001 22:55:15
 
 
To
19/01/2001 04:01:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00465557
Message ID:
00466447
Views:
20
>Thanks for your kind reply on this matter.
>
>Actually, i'd already taken care of the 2 points you mentioned. It really returns True for the TableUpdate() call, and the
>CursorSetProp() is placed in Form.Load() method once and only once and the form is set to private data session.
>
>Everything's normal until some day it just explode.
>
>I tested the table using the 5-line code in my message, excuted in the command prompt, because i want to skip all
>possible influence of the input form.
>
>Any idea?



Um..... I got no idea on fix your bug but I can give you simple suggestion on handling adding records:

Pls test the follow if work or not?
CLOSE DATABASE ALL
USE Customer AGAIN IN 0 ORDER TAG Cust_NO SHARED
=CursorSetProp("Buffering",5,"Customer")

SELECT Customer
APPEND BLANK
REPLACE Cust_No With [C003], Cust_Name With [Test Company]....

Begin Transaction
IF TableUpdate(.T.) = .F.
     ROLLBACK
     MESSAGEBOX([Fail to Add, Now ROLLBACK], 16, [Add Customer Record])
ELSE
     End Transaction
     MESSAGEBOX([Success to Add, Now ROLLBACK], 64, [Add Customer Record])
ENDIF



I donno why sometime INSERT-SQL not work as my desired,
Even I know every data to insert, I use APPEND BLANK and Fill in data instead!

For example,

Create TABLE TestABC (bNo N(7))
For iX = 1 to 10
INSERT INTO TABLE TestABC (bNo) VALUE (ix)
ENDFOR

* the above insert got error, but

Create TABLE TestABC (bNo N(7))
For iX = 1 to 10
APPEND BLANK
REPLACE bNo with iX
ENDFOR

* the above append work fine... SO i choose the 2nd one! #_#;


Hope this help!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform