Browse Site by Tags

Showing related tags and posts across the entire site.
  • Add a column to an Access Table

    Now we have created our Table we can start adding columns 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Thu, Dec 10 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • New Access Table

    I have already presented a function to create a new access table but I wasn’t very happy with it because we had to supply the full table creation SQL script. I have altered that function so it creates an empty table. We can then use the Add-AccessColumn function to add columns. This also means I have...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Thu, Dec 10 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Access Bulk Load data

    We have already seen how to load individual records into an Access Table.  Sometime we require the ability to add multiple records.  We can easily adapt the way we use our Add-AccessRecord function to accommodate a bulk load scenario. Lets create a csv file with the information FirstName,LastName...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Fri, Dec 4 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Working with Access dates

    Following on from the previous post about updating records one data type that will be a little awkward to work with is dates. If you use a US locale or any other that uses a date format of Month/Day/Year you can more or less ignore this because your standard formats work OK. If I run PS> Get-AccessData...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Mon, Nov 30 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Updating Access data

    The last of of our data manipulation tasks is to update the data – we have already seen how to create, read and delete. 001 002 003 004 005 006 007 008 009 010 011 012 013 function   Set-AccessData   { [ CmdletBinding ( SupportsShouldProcess = $true ) ] param   (     [string...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Mon, Nov 30 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Testing Connection to Access database

    Many of the functions we have created so far have taken a connection to an Access database as a parameter.  At the time we pass in the connection we don’t actually know if the connection is open. Test-AccessConnection can be used to test the connection before we use it.  All we do is test the...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Sun, Nov 29 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Removing Access Records

    So far we have seen how to add data to a table in an access database – now we want to delete some records.  This is an action that can cause problems especially if we get the wrong records – ideally we want to a mechanism to check what we are doing.  The PowerShell cmdlets that change system...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Sun, Nov 29 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Add Access Record Pt III – parameter sets

    Last time we added the option of inputting the table and values to our function but we needed a way to discriminate between that and using a full SQL statement.  We can achieve this by dividing the parameters into parameter sets NOTE – This is a PowerShell v2 capability . 001 002 003 004 005 006...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Fri, Nov 27 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Export Access data to csv file

    We already have all the functionality we need to achieve this. Import-Module accessfunctions $db = Open-AccessDatabase -name test03.mdb -path c:\test Get-AccessData -sql "select * from test1" -connection $db | Export-Csv -Path c:\test\test1.csv –NoTypeInformation Open the csv file in Excel...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Fri, Nov 27 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
  • Reading Access records

    Reading data from an Access database is similar to the functionality we have already seen. 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 function   Get-AccessData   { param   (     [string] $sql ,     [System.Data.OleDb.OleDbConnection...
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Thu, Nov 26 2009
    Filed under: Powershell, PowerShell V2, Office 2010, Access
Page 1 of 2 (14 items) 1 2 Next >