Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Insert statement thru Stored Proc being restricted

Author  Topic 

ryanlcs
Yak Posting Veteran

62 Posts

Posted - 2009-07-09 : 03:24:59
Hi

I have a simple insert query thru stored proc, but very confusing me is the query works if the insert item is 5. It failed without error message, just that no row is added.

Working query:

Insert SPC_DT16B_AllStatus(Plant,Process,Plating,Tank_Station_Id,Status)
Values(@plant,@Process,@Plating,@Tank_Station_Id,@str_GlobalStatus)


If I add another field, it failes
Failed query:

Insert SPC_DT16B_AllStatus(Plant,Process,Plating,Tank_Station_Id,Status,Form_Factor)
Values(@plant,@Process,@Plating,@Tank_Station_Id,@str_GlobalStatus,@Form_Factor)


I had check that it is not due to the data of newly added field 'Form_Factor', because the following query with Form_Factor, but 5 items only works.

Working query:

Insert SPC_DT16B_AllStatus(Plant,Process,Tank_Station_Id,Status,Form_Factor)
Values(@plant,@Process,@Tank_Station_Id,@str_GlobalStatus,@Form_Factor)


Please advice.

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-07-09 : 03:49:20
Hi

It should work ..... can you post the error message....
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-07-09 : 03:54:42
@rajdaksha: OP has already posted there is no error message.

@ryanlcs: Seems that we need to see the code of stored procedure...


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

ryanlcs
Yak Posting Veteran

62 Posts

Posted - 2009-07-09 : 04:01:43
Hi...

The set of code is more than 700 lines, and read in few parameter, i dont think it is possible you all will go thru all the codes.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-07-09 : 06:03:44
But in fact there is nothing wrong to see in the given information.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

saran_d28
Starting Member

36 Posts

Posted - 2009-07-09 : 06:23:41
Due to data mismatch or parameter width mismatch


--Saravanan
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-07-09 : 07:10:22
quote:
Originally posted by saran_d28

Due to data mismatch or parameter width mismatch


--Saravanan



But then there should be an error message!?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -