Archives

Archives / 2003 / November
  • More about Regex Blogs

    Senkwe Chand left the following comment on my last entry and I thought that I'd answer it here to clear any confusion that might exist:

  • Meet the Buffer Cache

    I realize that most hard-core backenders will already know most of this but, with all of the posts that have entered my aggregator relating to sprocs and ad-hoc sql, I thought that I'd take this opportunity to add a link to an article I wrote a few years ago which discusses what gets cached (and when):

  • Learning the Framework is definitely an incremental process!

    I read the new "Beyond (COM) Add Reference: Has Anyone Seen the Bridge?" article yesterday and, was quite impressed by the detailed groundwork that was laid-out to explain the differences between COM and CLR and, how Interop provides a bridge for seamlessly calling in and out of both environments.  As the author states in that article the real meat is still to come so, if you are reading this and you haven't already read that article scoot over now and give it a look - you won't be disappointed.

  • Better use of the mark-up tool

    Duncan, gave my mark-up tool a nice plug today but missed a very important feature. It is emminently better to mark-up code snippets using Css styles (as opposed to Html tags) because you can have global control over how your code samples are rendered. To set the tool to output Css styles do the following:

  • Feature complete - Bug Triage - Golden Release.... ahhhhhh software :-)

    I've been so busy lately that my world has just been a complete blur.  In the past week I've had a job change, helped to release a new blogging community (http://regexblogs.com) and been involved in numerous out of hours endeavours.  Put all of that on top of my family (which includes a newborn), co-ordinating a new swimming pool and a new bridge to cross our creek and you can clearly see that there is the potential for stack overflow.

  • Change the owner of all db objects

    It was after running the sql scripts to install a new database that I noticed that the author had not prefixed the objects with "dbo." and so, after running them I noticed that they were owned by the user that I was logged-in as at the time (super_administrator!). Well, it wasn't going to be very useful to have everyone logging in using that account to run the sprocs so, I wrote the following script to enumerate the tables and sprocs and assign a new owner:


    DECLARE @currentObject nvarchar(517)
    DECLARE @qualifiedObject nvarchar(517)
    DECLARE @currentOwner varchar(50)
    DECLARE @newOwner varchar(50)
    
    SET @currentOwner = 'ASPNET'
    SET @newOwner = 'dbo'
    
    DECLARE alterOwnerCursor CURSOR FOR
    SELECT [name] FROM dbo.sysobjects 
    WHERE xtype = 'U' or xtype = 'P'
    AND LEFT([name], 2) <> 'dt'
    OPEN alterOwnerCursor
    FETCH NEXT FROM alterOwnerCursor INTO @currentObject
    WHILE @@FETCH_STATUS = 0
    BEGIN
       SET @qualifiedObject = CAST(@currentOwner as varchar) + '.' + CAST(@currentObject as varchar)
       EXEC sp_changeobjectowner @qualifiedObject, @newOwner
       FETCH NEXT FROM alterOwnerCursor INTO @currentObject
    END
    CLOSE alterOwnerCursor
    DEALLOCATE alterOwnerCursor
    

  • XmlComment syntax for VB

    Where I am at the moment we use: '/ for XMLCommenting syntax. Originally there was some mention that, when the VB team add support for XmlComment'ing they would adopt '@ as the syntax whereas, Paul Vick has just confirmed that it will most likely end as '''. As a friend once said to me: Syntax I care zippo about but semantics, that's different!

  • Dim a : VB Is Not a TypeOf Misanthropy

    After copping a bit of a bollocking at the hands of the masses the other day, Paul Vick has thrown out some reasonably insightful diatribe regarding proposed code re-writing functionality which is slated for inclusion in an already feature rich IDE.

  • Will VB have the yield keyword?

    It appears that the VB team are deciding whether or not to give the world access to some code re-writing functionality that has become loosely known throughout the programming world as "code refactoring".  This is a feature where you can ask the IDE to invoke a macro on a section of code rather than having to perform the arduous 3 or 4 steps manually.  The thing is that they've decided that their target user either won't understand or (perhaps) will be scared off by the term "Refactor" so, they would propose to call the Refactor function something other than “Refactor” - similar to when they called Partial classes something other than “Partial” I suppose.