Viewing 15 posts - 16 through 30 (of 48 total)
Thanks Kevin, I'm definitely going to check this out!
Yeah, I've not been tempted by the ORM route yet for the very reason you mentioned.
Thanks again for the link, I know...
February 10, 2011 at 12:26 pm
Glad you both enjoyed it and, yes, having just been put onto merge, I may well start using this.
Cheers, james
February 10, 2011 at 9:57 am
@pdnethercott
Glad it worked for you!
Yes, I too use a combined "save" procedure in a number of systems (for inserts and updates). You'll easily be able to tweak the code...
February 10, 2011 at 9:45 am
Chris,
This could easily be built in, as you have both the parameters and the column names available in the createUpdate SP, and it would just be a question of adding...
February 10, 2011 at 9:39 am
Interesting Peter but you still then have the overhead of maintaining the base table upon insert, update and delete. I think you'd have to test with both scenarios to ascertain...
February 10, 2011 at 9:13 am
Although as I'm now heading towards VS.Net database projects, I may switch to using sql to write C# stored procedure classes!
Thanks for the feedback, appreciate it.
Cheers, James
February 10, 2011 at 9:07 am
Good spot! For the computed column you just need to add a bit to the where clause: and COLUMNPROPERTY([object_id] ,[object_name], 'IsComputed') = 0
Cheers, James
February 10, 2011 at 7:10 am
All good points and noted. It would be simple to retrieve the permissions the first time from the table if the procedure didn't exist and subsequently get them from the...
February 10, 2011 at 4:56 am
Apologies Kristian, I do know this as I used it to write the article! The previous post has been altered accordingly.
February 10, 2011 at 3:41 am
@natedogg and anyone else who wants to try this and has column names that are reserved words in sql server, revised createInsert and createUpdate procedures to cope with this:
/*
Insert Procedure...
February 10, 2011 at 3:29 am
@natedogg
Try this:
CREATE TABLE [dbo].[tblautosp](
[idprimary] [int] IDENTITY(1,1) NOT NULL,
[desc_text] [nchar](10) NULL,
CONSTRAINT [PK_tblautosp] PRIMARY KEY CLUSTERED
(
[idprimary] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =...
February 10, 2011 at 3:16 am
The bit in the stored proc that's complaning folks is the query to retrieve the columns for the table minus the primary key.
@natedogg
What do you get if you execute the...
February 10, 2011 at 3:07 am
@Mahesh-457542
I for one have not used the ADO.NET Entity Framework as yet, as I do all middle-level business objects in WFC, due to the control this gives me and the...
February 10, 2011 at 2:13 am
@Rahul The Dba
A primary key is always a good idea, as it enforces uniqueness. This doesn't have to be an identity value though and I have tables, especially ones with...
February 10, 2011 at 1:29 am
Hi Jonathan,
Unfortunately the two systems that this is implemented in are seriously high volume OLTP systems and so the extra cost of defensive programming has been vetoed - plus we...
February 9, 2011 at 12:39 pm
Viewing 15 posts - 16 through 30 (of 48 total)