Exforsys

Online Training

Problem with stored procedure

This is a discussion on Problem with stored procedure within the SQL Server 2005 Tutorials forums, part of the Articles and Tutorials category; Hi, Im getting the following error when trying to execute the stored procudre. String or binary data would be truncated. ...


Go Back   Exforsys > Articles and Tutorials > SQL Server 2005 Tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-05-2004, 09:48 PM
Member
 
Join Date: Apr 2004
Posts: 37
NareshShroff
Problem with stored procedure

Hi,
Im getting the following error when trying to execute the stored procudre.

Quote:
String or binary data would be truncated.
The statement has been terminated.
can anyone help me out.

Stored procedure:
Quote:
CREATE PROCEDURE taskInsert
(
@taskid char(10),
@task char(20),
@type char(10),
@createdate varchar(50),
@createdby char(10),
@notes varchar(500),
@activedate varchar(50),
@duedate varchar(50),
@locid char(10),
@completedate varchar(50),
@closeddate varchar(50),
@completedby char(10),
@closedby char(10)
)
AS
INSERT INTO Tasks VALUES
(@taskid, @task, @type, @createdate, @createdby, @notes, @activedate, @duedate, @locid,
@completedate, @closeddate, @completedby, @closedby)
GO
and the values that iam trying to insert
Quote:
Execute taskInsert \'OT-90\', \'open the door\', \'open\', \'5 oct 2004 1:40 PM\',
\'nshroff\', \'regregerg\', \'\',\'\',\'Ucenter\',\'\',\'\',\'\',\'\'
i think the problem is with null values. My table structure allows null values also but still cant able to figure it out.

Thanks in advance

Post edited by: NareshShroff, at: 2004/10/05 22:00

Post edited by: NareshShroff, at: 2004/10/05 22:04
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-06-2007, 03:16 AM
Junior Member
 
Join Date: Jul 2007
Posts: 8
ussainbasha is on a distinguished road
hai naresh,
i think the error can be producing from ur first line...
first u i think the syntax is
<create procedure databasename.procedurename.........>
please try this like insha allah you get the right answer...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:31 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.