Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9119985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:31:36+00:00 2026-06-17T05:31:36+00:00

In php script there is T-SQL update query to SQL Server table. It works

  • 0

In php script there is T-SQL update query to SQL Server table. It works fine until I enable trigger on target table. When trigger is enabled I receive DBDatabase error: Invalid SQL, MSSQL Error: 1 (General Error (The MSSQL interface cannot return detailed error messages).)
Session halted.
But if I run query directly in Management Studio – it works normal even when trigger is On.
How to fix that?

upd:
query UPDATE T_USER SET US_KEY='30087', US_TEXT=NULL, US_LIC=NULL, US_PRKEY=14696, US_TURAGENT=0, US_REG=1, US_3=0, US_4=0, US_KOL=0, US_2=0, US_ID='test', US_PASSWORD='111', us_manager='manager', US_EMAIL=NULL, US_HOST=NULL, US_ADDRESS=NULL, US_PHONE=NULL, US_COMPANYNAME='Individual', US_AGENT='Individual', US_FAX=NULL WHERE US_KEY = 30087

trigger

ALTER TRIGGER [dbo].[tt_updEncryptedPassword] 
   ON  [dbo].[T_USER]
FOR UPDATE
AS 
BEGIN
    SET NOCOUNT ON;
IF UPDATE(US_PASSWORD)
begin 
declare @str    varchar(256),@uskey int,@encrypted  varchar(256)    
select @uskey=US_KEY,@str=US_PASSWORD from Inserted
DECLARE  @URL SysName,@Header XML,@Body XML
;WITH XMLNAMESPACES (DEFAULT 'http://tempuri.org/')
SELECT   @URL   = 'http://10.0.10.1/encryptionservice/EncryptionService.asmx'
    ,@Body      = '    <EncryptString xmlns="http://www.qwe.com/">
      <source>'+@str+'</source>
    </EncryptString>'
EXEC    dbo.spSOAPMethodCall @URL,@Header OUT,@Body OUT
;WITH XMLNAMESPACES(DEFAULT 'http://www.qwe.com')
select @encrypted=X.z.value('EncryptStringResult[1]', 'varchar(250)') from @Body.nodes('/EncryptStringResponse') AS X(z)

update [T_USER] set US_BANKNAME=@encrypted where US_KEY=@uskey
end

END
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:31:38+00:00Added an answer on June 17, 2026 at 5:31 am

    solved via adding SET CONCAT_NULL_YIELDS_NULL ON;
    SET ANSI_WARNINGS ON;
    SET ANSI_PADDING ON;
    before running insert/update.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any php script to find the name of the web server like
Wondering if there is any php script out there which takes an sql db
I launch a pl/sql script by a PHP application but I notice when there
Is there any PHP script to convert XML file to DTD. I tried a
Is there anyway for this PHP script to know what are the scripts or
I red there's a limit for a PHP script to be executed and I
Is there a way to redirect output of an executing PHP script? Of course
Is there any security risk of injection in the following PHP script? <?php $empfaenger_1
I need to handle strings in my php script using regular expressions. But there
Following is my php login script, There are one problem. If i put any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.