PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
MS SQL Triggers question from a beginner
MS SQL Triggers question from a beginner
Started by Antonio Díaz, Feb., 26 2024 10:29 PM - 1 reply
Connect yourself…
Antonio Díaz
#1
Registered member
71 messages
Posted on February, 26 2024 - 10:29 PM
Hi guys,
For those of you who know Clarion, I come from many years of using it. I've used Triggers (on the server side) all the time but I have problems with WINDEV. I always get an error (huge content error) saying that too many rows are affected by the update.
The thing is I always get that error when the db tries to run a trigger to update certaing tables. The same trigger that runs using my clarion app, does not run using my windev app. Is there something I should take into account? I've looked for information but haven't found anything.
I thank you for your help.
--
Antonio Diaz
Emphasys Software, S.C.
Report
0
0
priv!pyntr5BMtznvy+p1z
#2
Posted on October, 14 2024 - 12:41 AM
Antonio Díaz wrote:
Hi guys,
For those of you who know Clarion, I come from many years of using it. I've used Triggers (on the server side) all the time but I have problems with WINDEV. I always get an error (huge content error) saying that too many rows are affected by the update.
The thing is I always get that error when the db tries to run a trigger to update certaing tables. The same trigger that runs using my clarion app, does not run using my windev app. Is there something I should take into account? I've looked for information but haven't found anything.
I thank you for your help.
--
Antonio Diaz
Emphasys Software, S.C.
Hi antonio
i have been using windev with Sqlserver since version 20 with few problems
see below the way i use triggers in MSsql server
USE [Teste]
GO
/****** Object: Trigger [dbo].[LogLocal] Script Date: 10/13/2024 19:37:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[LogLocal] ON [dbo].[local]
FOR UPDATE ,DELETE
AS
Declare @USERDEC char(10), @USERNT CHAR(30)
SELECT
@USERDEC = convert(varchar(10),context_info),
@USERNT = SUBSTRING(host_name + '\' + login_name, 1,40)
FROM sys.dm_exec_sessions
WHERE session_id = @@SPID
Insert Log.dbo.LogLocal
Select 'U',
Getdate() ,
@USERDEC ,
@USERNT,
d.* from Deleted as D
inner join inserted as I on
I.Loc_codigo = D.Loc_codigo
UNION ALL
Select 'D',
Getdate(),
@USERDEC ,
@USERNT,
d.* from Deleted as D
left join inserted as I on
I.Loc_codigo = D.Loc_codigo
where I.Loc_codigo is NULL
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WINDEV 2024
WEBDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WINDEV (earlier versions)
WINDEV 26
WINDEV 2025
WINDEV 2024
WINDEV 25
WEBDEV 2025
WEBDEV 2024
WINDEV Mobile 2025
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text