Forum Replies Created

Viewing 15 posts - 16 through 30 (of 48 total)

  • RE: Automatically Generate Stored Procedures

    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...

  • RE: Automatically Generate Stored Procedures

    Glad you both enjoyed it and, yes, having just been put onto merge, I may well start using this.

    Cheers, james

  • RE: Automatically Generate Stored Procedures

    @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...

  • RE: Automatically Generate Stored Procedures

    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...

  • RE: Custom Sequence Numbering

    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...

  • RE: Automatically Generate Stored Procedures

    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

  • RE: Automatically Generate Stored Procedures

    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

  • RE: Automatically Generate Stored Procedures

    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...

  • RE: Automatically Generate Stored Procedures

    Apologies Kristian, I do know this as I used it to write the article! The previous post has been altered accordingly.

  • RE: Automatically Generate Stored Procedures

    @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...

  • RE: Automatically Generate Stored Procedures

    @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 =...

  • RE: Automatically Generate Stored Procedures

    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...

  • RE: Automatically Generate Stored Procedures

    @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...

  • RE: Automatically Generate Stored Procedures

    @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...

  • RE: Custom Sequence Numbering

    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...

Viewing 15 posts - 16 through 30 (of 48 total)