ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Mauricio Rojas Blog

October 2007 - Posts

  • Case Sensitive SQL Server

    Recently a friend at work had a problem querying a SQL server that indicated that the column name was wrong.

    The only thing wrong was the the case. For example he had COLUMN1 instead of Column1. I had never seen that problem in SQLServer.
    I had seed that in Sybase but not in SQLServer. He solved that by changing the database collating sequence to something like this:

    alter database database1 collate SQL_Latin1_General_CP1_CI_AI

    the CI in the collating indicates Case Insensitive

    For more information on SQL Server collations check: http://msdn2.microsoft.com/en-us/library/aa258233(SQL.80).aspx

    And you determine your current database collation use a code like this:

    USE yourdb>
    GO

    print 'My database [' + db_name() + '] collation is: ' + cast( DATABASEPROPERTYEX ( db_name(), N'Collation' ) as varchar(128) )

    print 'My tempdb database collation is: ' + cast( DATABASEPROPERTYEX ( 'tempdb', N'Collation' ) as varchar(128) )

     

  • Track Changes in VSS (Visual Source Safe)

    MS VSS (Visual SourceSafe) is not really my preferred Source Control application, but
    sometimes in your company that is what is available and you need to used it to have
    at least some versioning of the code.

    But haven't you had a situation where last week everything worked and
    now everything is broken. And now is up to you to determine what went
    wrong? I have it all the time.
     

    VSS have some search tools but I really do not enjoy using them.
    The Code Project Site provides an excellent tool called VssReporter

    Sample Image - VssReporter.jpg

    Do take a look at it, it makes it more easy to track changes. :)

     

  • Get GUIDs/CLSIDs from Exe, dll, ocx, tlb, etc

    A simple way of getting the GUID from an exe, dll, ocx, tlb is using the  TLBINF32.dll

    This file is in the system path and it must be registered
    (Remember to use regsvr32 if you haven't registered).

                TLI.TLIApplicationClass a = new TLI.TLIApplicationClass();
                try
                {

                    TLI.TypeLibInfo inf = a.TypeLibInfoFromFile(@"c:\windows\system32\MSHFLXGD.OCX");
                    MessageBox.Show(
                    "TypeLibrary Name " +  inf.Name + "\r\n" + //name of (Type Library)
                    "Tlb ID " +  inf.GUID + "\r\n" + // GUID for Library
                    "LCID "  + inf.LCID + "\r\n" + // Language / Country
                    "Major Version "+ inf.MajorVersion + "\r\n" + // Major Version
                    "Minor Version "+ inf.MinorVersion); // Minor Version
                    for (short i = 1; i < inf.TypeInfoCount; i++)
                    {

                        TLI.TypeInfo inf2 = inf.TypeInfos[i];
                        MessageBox.Show("CLSID " + inf2.Name + " - " + inf2.GUID,i + " of " +
    inf.TypeInfoCount);

                    }
                }
                catch (Exception ee)
                {
                    MessageBox.Show("No guid");
                }

     

     

  • cfgrid or ext grid change column align

    If you are using Coldfusion MX 8 cfgrid or the excelent Ext library and
    you want to change the aligment for the column then a simple way
    to do that is:

    Add an style block like

     .x-grid-col-0 {text-align:center}
     .x-grid-col-1 {text-align:left}
     .x-grid-col-2 {text-align:right}

    And that's all just remember to change  .x-grid-col-n change the n for the column you want to modify.

    Posted Oct 23 2007, 10:42 AM by Mrojas with no comments
    Filed under:
  • Clean Up your Coldfusion application

    Currently I'm working in some tools to clean
    your code, whether it is VB, ASP or Coldfusion.

    Mostly simple tools, but for now if you are a
    ColdFusion Developer I want to recommend a nice
    application called CF Project Cleaner
    This tools lends you a hand so you can
    get rid of unused files. The tool is not perfect. But it is always handy
    to review your code.
  • MAN for .NET

    Microsoft recently published the MTPS Content Service

    In brief, the MTPS Content Services are a set of
    web services for exposing the content in
    Microsoft/TechNet Publishing System (MTPS).


    And Craig Andera, has develop a swift nice tool
    called msdnman that you use from the command line to
    get information from the MSDN

    Also I recommend you to see this cool video of a Human LCD that Hugo sent me
  • Comparison Tool for Windows

    If you need a good and FREE comparison tool
    I recommend WinMerge
  • Input Line Too Long

    I was trying to compile a C++ Project in Visual Studio
    and this project has a post-build step that executes
    some batch statements.

    And succendly from one day to the other the project failed
    and the only message I had was
    The input line is too long


    After some googling I found that this error is displayed
    when the command line in the command prompt
    exceeds the maximum number of characters.
    (Something quite obvious jeje)

    The bottom line was that recenlty I had installed
    some software and my PATH variable became TOO long
    I fixed it by creating a new environment variable
    called EXTRA_PATH where I put some references to
    Some big paths and then changed my PATH variable
    replacing all those long variables for %EXTRA_PATH%.

    And problem solved!
  • VB6 References Explorer

    I recently found this decent tool called VB6 Reference Explorer.
    It even comes with source code.

    This tool will show a list of the references for a set of projects in your path.




    Here at Artinsoft, some colleagues have develop
    some tools that perform even more exhaustive
    project analisys like CreateObject dependencies
    and others. Maybe I'll post something about those
    tools in the future
  • VB6 Printer Object and PrintForm migration

    If you ever had any problems while migrating from VB6 Printer Object or the PrintForm functionality
    we have goods news for you the Microsoft Visual Basic 2005 Power Pack 2.0.
    Our version of the Visual Basic Companion already provides and extended migration of the Printer Object,
    and we're now updating it to use this new implementation. This Printer Compatibility Library makes it a
    breeze to migrate Printer Functionality.

    This is the description of the PowerPack:

    "The new Line and Shape controls included in this version of the Visual Basic 2005 Power Packs are
    a set of three graphical controls that enable you to draw lines, ovals, and rectangles on forms and
    containers at design time making it much easier to enhance the look of your user interface.
    These new shape controls also provide events such as click and double-click allowing developers
    to respond and interact with end users.

    The Printer Compatibility Library allows projects that used the Printer and Printers Collection in Visual Basic 6.0
     to be upgraded without having to re-write your printing logic. By simply adding a reference to the library, declaring a
    Printer and making a few minor syntax changes, your project will be able to print using the Printers collection
    and Printer object as it did in Visual Basic 6.0. This version adds a new Write method to the Printer object which
    allows you to print text without a forced carriage return similar to the semicolon syntax used by Print method in Visual Basic 6.0.

    The PrintForm component is designed to bring back the ability to easily print a Windows Form.
    With this the new PrintForm component you can once again layout the Windows Form exactly as
    you want it and allow your users to print the form as a quick report."

    You can download the PowerPack from here

    NOTE: there's is another link that only includes the Printer Library but MS recommends to download the PowerPack
    because minor upgrades and fixes will be done on the PowerPack distribution

     

This Blog

Syndication

Powered by Community Server (Non-Commercial Edition), by Telligent Systems