This project is read-only.
1

Resolved

tinyint crud error - SQL incorrect

description

Msg 2716, Level 16, State 1, Procedure up_Addresses_Insert, Line 3
Column, parameter, or variable #10: Cannot specify a column width on data type tinyint.
 
Look for the syntax error for tinyint delcaration...
 
Create Procedure up_Addresses_Insert
(
@CompanyID int,
@Address1 nvarchar(255),
@Address2 nvarchar(255),
@Address3 nvarchar(255),
@Address4 nvarchar(255),
@Town nvarchar(255),
@County nvarchar(255),
@Postcode nvarchar(10),
@CountryISOCode nchar(3),
@AddressOrder tinyint(1),
@DateCreated datetime,
@CreatedBy nvarchar(50)
)
AS
BEGIN
.......

comments

TomLeeson wrote Jan 23, 2008 at 12:56 PM

@AddressOrder tinyint(1), should be : @AddressOrder tinyint,

TomLeeson wrote Jan 23, 2008 at 12:58 PM

fantastically useful CRUD tool... Thanks!
It wold be nice if i could get rid of the bad practice of placing sp_ in front of stored procs though...
Maybe corporate standards could be attached via a template of some sort for SQL standards...?

ld9474 wrote Jan 23, 2008 at 5:42 PM

Absolutely right.
As for standards, i should explain how the project came out. In fact it has been a long time i have worked on the project but i never really had time to test it or at least test all possible cases (is it possible anyway?). A few times ago (october 2007 to be more precise), i was asked to finsih the tool ASAP so that it can be used for projects my company develop. So i speeded up a bit, but i'm concious everything is not that well implemented. DAL is one aspect of the architecture i want to improve. I also want to implement standard Design Patterns. But all this take time and as everyone i only have 24 hours a day among which at 12 hours at work...
Thanks for reporting the issue this is very useful.

wrote Jan 23, 2008 at 5:42 PM

wrote Jan 23, 2008 at 8:21 PM

wrote Jan 23, 2008 at 8:43 PM

ld9474 wrote Jan 23, 2008 at 8:52 PM

The fix was published in the Patch #1.

wrote Feb 13, 2013 at 7:35 PM

wrote May 15, 2013 at 3:48 AM

wrote May 15, 2013 at 3:48 AM

wrote Jun 12, 2013 at 1:38 AM