Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble inserting data
Message
 
 
To
18/06/2013 16:49:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01576652
Message ID:
01576657
Views:
38
>
>ALTER TRIGGER [dbo].[cuotasp] ON [dbo].[PRESTAMOS] 
>AFTER INSERT 
>AS 
>BEGIN
>	declare @presta int,@cliente int,@docu varchar(14),@tasam numeric(10,2),@diasm int
>	select @presta=idprestamo,@cliente=idcliente,@docu=documento,@tasam=mora,@diasm=dias_mora from inserted
>	EXEC [P_GCUOTAS]@presta,@cliente,@docu,@tasam,@diasm
>END
>
Well, this trigger is written for a single row operation. What does the P_GCUOTAS] procedure do? You most likely will need to run a cursor loop in your trigger if you want to use this procedure for all rows inserted. Are you sure you want to perform this operation in a trigger? May be you would be better doing insert first and then run the procedure for all inserted rows in the same procedure that did that insert?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform