Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored proc triggers read only error
Message
De
23/07/2008 13:12:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Stored proc triggers read only error
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
01333481
Message ID:
01333481
Vues:
52
I have a SP that is supposed to update the current table. I get "Cannot update the cursor DEALERS, since it is read-only." The table is not read only. Does anyone know why I would get this read only error message from running the stored procedures?

Here are the SPs:
FUNCTION spDealersInsertTrigger()
? ISREADONLY()
REPLACE ChangeDate WITH DATE(), Change WITH "NEW"
RETURN
ENDFUNC

FUNCTION spDealersUpdateTrigger()
? ISREADONLY()
REPLACE ChangeDate WITH DATE()
RETURN
ENDFUNC

Here is the GENDBC code:
DisplayStatus([Creating database...])
CLOSE DATA ALL
CREATE DATABASE 'MYDBC.DBC'
DisplayStatus([Creating table DEALERS...])
MakeTable_DEALERS()
DisplayStatus([Finished.])

FUNCTION MakeTable_DEALERS
***** Table setup for DEALERS *****
CREATE TABLE 'DEALERS.DBF' NAME 'DEALERS' ( ;
COMPANY C(45) NOT NULL, ;
ADDR1 C(45) NOT NULL, ;
ADDR2 C(45) NOT NULL, ;
CITY C(21) NOT NULL, ;
ST C(2) NOT NULL, ;
ZIP C(10) NOT NULL, ;
CHANGE C(62) NOT NULL, ;
CHANGECODE C(1) NOT NULL, ;
CHANGEDATE D NOT NULL)

***** Change properties for DEALERS *****
CREATE TRIGGER ON 'DEALERS' FOR INSERT AS spdealersinserttrigger()
CREATE TRIGGER ON 'DEALERS' FOR UPDATE AS spdealersupdatetrigger()
ENDFUNC

FUNCTION DisplayStatus(lcMessage)
WAIT WINDOW NOWAIT lcMessage
ENDFUNC
David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform