Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Negative number on table update
Message
 
To
13/07/2017 21:03:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01652622
Message ID:
01652653
Views:
52
>Thanks Tamar et al.
>
>Okay. Here's what I'm doing:
>
>I have a local view that is being used to capture business data (i.e. name, ein, city, state zip etc). After the user inputs the data, presses the save button, the code does some validation (i.e. not empty, checks valid EIN prefix etc). Upon clean validation, the code then does an Insert (field 1, 2 , 3 etc) values (thisform.text1.value, thisform.text2.value etc etc). There is a primary key associate with this view (pk_comp_id). But I am having that field populated with a procedure called oPro.GetNewRec. This is nothing more than the NewId stored procedure that is commonly used in the default value of the table field name. I just decided to make it a class and pass the table name to it: oVar.NewRecId = oPro.GetNewRec('lv_company_view')
>
>Then i goto the local view, locate teh record that was just created and simply attempt, to do a Replace pk_comp_id with oVar.NewRecId. Then i do my tableupdate, and grins...I have a brows as the next line to see which fields were populated clean. All the fields were poplated clean EXCEPT the pk_comp_id. The tableupdate is returning a -1 and .T. all the time, every time.
>
>Any ideas to what is going on from anyone...this has been kicking my butt all week...

Show us the code, INSERT and then replace of PK.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform