home
training courses
why choose us?
solutions
support
company
LearnItFirst User Forum
Welcome Guest
Search
|
New Posts
|
Members
|
Log In
|
Register
SQL Server Forum - LearnItFirst.com
»
SQL Server Database Administration
»
Backup, Recovery and Disaster Recovery
»
Triggers - are not supporting Text,Image data types
Triggers - are not supporting Text,Image data types
Options
Previous Topic
·
Next Topic
fairDmaster
Posted:
Monday, November 19, 2007 11:36:05 AM
Rank: Newbie
Joined: 11/16/2007
Posts: 2
Points: 12
Where do you live?: INDIA
Hi Scott,
I cant able to use TEXT and IMAGE datatype using TRIGGERS.
sample code:
********************************
CREATE TRIGGER TRG_INSERT_LOG ON dbo.LogTable
AFTER INSERT
AS
BEGIN
INSERT INTO LogDescrition,LogImage
SELECT Description,Image from INSERTED;
END
********************************
while running this query system shows the error ;
It wont support the TEXT,IMAGE datatype in TRIGGERS.
pls. advise how to use data type like TEXT,IMAGE in TRIGGERS?
Best Regards,
fair...trying2...b...a...Master
--------------------------------------------
Back to top
Scott Whigham
Posted:
Wednesday, November 21, 2007 4:53:46 AM
Rank: Super Mod
Joined: 3/20/2006
Posts: 460
Points: 1,002
Where do you live?: Dallas, TX
fairDmaster wrote:
pls. advise how to use data type like TEXT,IMAGE in TRIGGERS?
You can't use text/image datatypes in a trigger but you can use VARCHAR(MAX) and VARBINARY(MAX) - are you using SQL 2005?
Back to top
fairDmaster
Posted:
Wednesday, November 21, 2007 4:59:58 AM
Rank: Newbie
Joined: 11/16/2007
Posts: 2
Points: 12
Where do you live?: INDIA
Hi Scott,
Thanks for the reply.
Yes! I'm using SQL server 2005, in that in table i have colums like text,image datatypes.
But in triggers they are not supported.. Without changing the table data type is this possible to convert and use it in triggers?
Awaiting with thanks!
Best Regards,
fair...trying2...b...a...Master
--------------------------------------------
Back to top
Scott Whigham
Posted:
Wednesday, December 19, 2007 1:20:26 PM
Rank: Super Mod
Joined: 3/20/2006
Posts: 460
Points: 1,002
Where do you live?: Dallas, TX
Oops - missed this one
I don't know how you could do what you're asking. Here's the rule: "No text/image datatypes in a trigger." Here's your request: "Yeah, but I want to - how can I?" I don't know of a way you can circumvent this rule
Sorry
Back to top
Users browsing this topic
Guest
Forum Jump
SQL Server Database Administration
- General SQL Database Question & Answer
- Backup, Recovery and Disaster Recovery
- SQL Server Security
- Integration Services (SSIS) and DTS
Transact-SQL Programming
- DML (SELECT, INSERT, UPDATE, DELETE) Questions
- Stored Procedures, Triggers, & Functions
SQL Server Scripts, Code Samples and SSMS Custom Reports
- All SQL Server Versions
- SQL Server 2005/2008
- SQL Server Management Studio Custom Reports
Customer Service
- Video Requests
You
cannot
post new topics in this forum.
You
cannot
reply to topics in this forum.
You
cannot
delete your posts in this forum.
You
cannot
edit your posts in this forum.
You
cannot
create polls in this forum.
You
cannot
vote in polls in this forum.
SQL Server 2005 DBA Training Videos
SQL Server 2008 DBA Training Videos
Watch this topic
RSS Feed
Email this topic
Print this topic
Threaded
Normal