Search This Blog

Friday, April 30, 2010

Employer is closing Hudson, Ohio

Hello All:

  I found yesterday that the office I work is closing.  I have an option to relocation to Wisconsin.
  So I am currently looking a position where my background in SQL Server, MS Access, VB6 and C# could be useful.

  Please pass along any opportunities you think I might be interested in.

Thanks
Gary Kindel

Tuesday, April 27, 2010

Never use Windows FixBoot!

I recently had a slave IDE ntfs drive parition go alittle south where Windows XP recognized the entire drive but saw it as Raw formatted partition.  Unfortunately, I did not realize until it was too late that fixBoot from XP recovery console creates a FAT12 Boot partition.  So now, I hosed up a perfectly good hard drive with 70 GB of family photos. 

Looking through my   software collection, I had an old copy spinrite 3.1 that had helped me recover files from a FAT32 drive 5 years ago.  I purchased and downloaded Spinrite 6.0 from Home of Gibson Research Corporation .  Spinrite failed to recognize my ~190 GB IDE drive and saw it as an oversided 128 GB drive.  Too nervous to proceed, I downloaded a demo copy of Partition Table Doctor from ptdd.com.  It saw the drive correctly as a 190 GB NTFS drive with a corrupted boot sector.  but of course the demo version would not fix the problem, had to purchase the full version.

But when I followed the link to purchase it, I found it was no longer being sold.
Partition Table Doctor Personal EditionSingle LicenseEnd of Marketing

EASEUS aims to offer more professional data recovery software Data Recovery Wizard other than Partition Table Doctor now!
Partition Table Doctor Unlimited EditionUnlimited License
Partition Recovery For Windows
(Partition Table Doctor Windows version)
Single License
Partition Recovery Bootable CD
(Partition Table Doctor DOS version)
Single License

Rats!  But I discovered that is was bundled and sold here:

Personal Data Recovery Package

Personal Data 
Recovery Package
Contains Partition Table Doctor and Data Recovery Wizard to recover data from disaster suffering partition or disk. The final tools for protecting your data from being lost. Single License.

It cost me $90 instead of just $45 but the software did work!  and I did get a refund for spinrite 6.0.
And of course, I immediately backed up my 70 Gbs of photos with only losing 3-4 photos.
 

So, don't use FixBoot!














 





Saturday, April 24, 2010

Updating MS Access Linked Tables - A better solution

I added DAO 3.6 reference to my project and used the following code

Decide to go this route because MS Jet 4.0/DAO 3.6 are part of the operating system and are in Windows 2000, XP, Vista and Windows 7. They are updated by Windows Update and the security patches are applied as appropriate.




        public static void RelinkDAOTables(string MDBfile, string filepath, string sql)
        {
            DataTable linkedTables = TableFromMDB(MDBfile, sql);

            dao.DBEngine DBE =new dao.DBEngine();
            dao.Database DB = DBE.OpenDatabase(MDBfile, false, false, "");
            foreach (DataRow row in linkedTables.Rows)
            {
                dao.TableDef table = DB.TableDefs[row["Name"].ToString()];
                table.Connect = string.Format(";DATABASE={0}{1} ;TABLE={2}", filepath, row["database"],row["LinkedName"]);
                table.RefreshLink();
            }      
           
        }





Updating MS Access Linked Tables

Currently, I am trying to convert a VB6 application that uses a single MS Access database with links to 7 others  access databases using DAO linked tables to C# and ADO.NET.  For now, I am want to keep MS access for data storage.  One of the things I need is code to modify linked tables in MS Access database using C#.  Here is what I found so far:


from www.johnsoer.com -  Updating MS Access Links

    ADODB.Connection Con = new ADODB.Connection();
    ADOX.Catalog Cat = new ADOX.Catalog();
    
    Con.Open(connectionString, null, null, 0);
    Cat.ActiveConnection = Con;
    Cat.Tables[LinkedTableName].Properties["Jet OLEDB:Link Datasource"].Value = LinkedDatabaseLocation;
    Con.Close();
     

Tuesday, April 13, 2010

Query Analyzer

Tutorals
Short-cut keys

CTRL-SHIFT-F2         -- Clear all bookmarks. 
CTRL+F2               -- Insert or remove a bookmark (toggle). 
F2                    -- Move to next bookmark. 
SHIFT+F2              -- Move to previous bookmark. 
ALT+BREAK             -- Cancel a query. 
CTRL+O                -- Connect. 
CTRL+F4               -- Disconnect. 
CTRL+F4               -- Disconnect and close child window. 
ALT+F1                -- Database object information. 
CTRL+SHIFT+DEL        -- Clear the active Editor pane. 
CTRL+SHIFT+C          -- Comment out code. 
CTRL+C or Ctrl+Insert -- Copy
CTRL+X or Shift+Del   -- Cut
SHIFT+TAB             -- Decrease indent. 
CTRL+DEL              -- Delete through the end of a line in the Editor pane. 
CTRL+F                -- Find. 
CTRL+G                -- Go to a line number. 
TAB                   -- Increase indent. 
CTRL+SHIFT+L          -- Make selection lowercase. 
CTRL+SHIFT+U          -- Make selection uppercase. 
CTRL+V or Shift+Insert -- Paste. 
CTRL+SHIFT+R          -- Remove comments. 
F3                    -- Repeat last search or find next. 
CTRL+H                -- Replace. 
CTRL+A                -- Select all. 
CTRL+Z                -- Undo. 
F5 or Ctrl + E        -- Execute a query. 
F1                    -- Help for Query Analyzer. 
SHIFT+F1              -- Help for the selected Transact-SQL statement. 
F6                    -- Switch between query and result panes. 
Shift+F6              -- Switch panes. 
CTRL+W                -- Window Selector. 
CTRL+N                -- New Query window. 
F8                    -- Object Browser (show/hide). 
F4                    -- Object Search. 
CTRL+F5               -- Parse the query and check syntax. 
CTRL+P                -- Print
CTRL+D                -- Display results in grid format. 
CTRL+T                -- Display results in text format. 
CTRL+B                -- Move the splitter. 
CTRL+SHIFT+F          -- Save results to file. 
CTRL+R                -- Show Results pane (toggle). 
CTRL+S                -- Save
CTRL+SHIFT+INSERT     -- Insert a template. 
CTRL+SHIFT+M          -- Replace template parameters. 
CTRL+L                -- Display estimated execution plan. 
CTRL+K                -- Display execution plan (toggle ON/OFF). 
CTRL+I                -- Index Tuning Wizard. 
CTRL+SHIFT+S          -- Show client statistics 
CTRL+SHIFT+T          -- Show server trace. 
CTRL+U                -- Use database