Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sp_cm_incrementcounter()
Message
From
11/11/2005 19:08:38
 
 
To
11/11/2005 05:43:03
General information
Forum:
Visual FoxPro
Category:
CodeMine
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
MS SQL Server
Miscellaneous
Thread ID:
01067567
Message ID:
01067996
Views:
11
>something like: ..(515)MS ODBC ... Cannot insert the value Null into
>column ... INSERT fails .

Do you know which column the error refers to? If it is the PK column in the table and you are using remote views (or a remote view definition for an updateable SQL PassThru cursor) make sure that the column (in the RV definition) is marked as updateable. If it is not, then you PK value will be set in the Fox client-side cursor but will not get sent to the back-end table. In this case, a NULL value might be trying to be written to a non-nullable PK column.

>What I really need to know is WHERE and how is triggered stored procedure
>for incrementing Primary Key counters ? Where should I look for and follow
>the execution after I append new record ?

If the PK in the SQL table is not an identity column, then if you use Codemines lAutoAssignPrimaryKey mechanism or just simply call the PrimaryKey() function in AfterNew(), then if you are using a SQL back-end, the function automatically calls sp_cm_IncrementCounter.
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform