Browse by Tags

All Tags » Access (RSS)

Access: Remove Stored Procedure

We have seen how to create and use a stored procedure – but as part of our usage patterns we need to be able to delete stored procedures as well. 001 002 003 004 005 006 007 008 009 010 011 012 013 function   Remove-AccessStoredProcedure   ...
Posted by RichardSiddaway | 1 comment(s)
Filed under: ,

Access: Invoke Stored procedure

  After creating a stored procedure we need to be able to run it 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 function   Invoke-AccessStoredProcedure   { # .ExternalHelp Maml-AccessFunctions.XML [ CmdletBinding...
Posted by RichardSiddaway | with no comments
Filed under: ,

Access: Stored Procedure

Next stop on our trip around Access functionality is the stored procedure.  An SP is a piece of code that we have defined, and saved in the database. It may take parameters or may just be a straight select statement. As with any Access object we...
Posted by RichardSiddaway | with no comments

View Access table definitions part 2

  Following on from the last post we wanted to be able to look at the table definitions 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 $datatype   =   DATA...
Posted by RichardSiddaway | with no comments

View Access table definitions

We’ve looked quite a bit at how we can work with Access databases but how do we investigate the structure of the database.  The first thing we need to know is the tables in our database 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015...
Posted by RichardSiddaway | with no comments

Getting Access table definitions

So far we have only created a single table but in a database with a number of tables we need to be able to view the table definitions. 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 ## ## connect to database ## $conn   =   New...
Posted by RichardSiddaway | with no comments

Delete an index

We have seen how to add indexes. We also need to be able to remove them 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 function   Remove-AccessIndex   { # .ExternalHelp Maml-AccessFunctions.XML [ CmdletBinding ( ) ] param  ...
Posted by RichardSiddaway | with no comments

Access Indexes Part 1

We have some data in our table – now we need to think about indexing it 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 function   New-AccessIndex   { # .ExternalHelp Maml-AccessFunctions.XML [ CmdletBinding...
Posted by RichardSiddaway | with no comments

Creating External help

In the previous post I included a line #  .ExternalHelp   Maml-AccessFunctions.XML  in the Add-AccessRecord function. I have used comment based help in the past but as James found http://blogs.technet.com/jamesone/archive/2009/07/24...

Modifying the Add-AccessRecord function

As we discovered last time we need to alter the Add-AccessRecord function to enable us to define the fields as well as the values. 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 function...
Posted by RichardSiddaway | with no comments

Change Autonumber start

  For some reason the autonumbering has got out of synch.  Maybe you already had data in the table and it wants to start at 1 or you’ve deleted a bunch of data and want to re-use some of the values. 001 002 003 004 005 006 007 008 009 010 011...
Posted by RichardSiddaway | with no comments

Access – Autonumbering columns

One thing we often want in our database table is a column that will automatically increment itself when a new record is added.  This makes a good primary key for the table as it is guaranteed to be unique. In this post http://msmvps.com/blogs/richardsiddaway...
Posted by RichardSiddaway | with no comments

Access Functions

I have put the module of Access functions I’ve been blogging about over the last few weeks onto my SkyDrive at http://cid-43cfa46a74cf3e96.skydrive.live.com/browse.aspx/PowerShell%20Scripts/AccessFunctions The file is alos attached to this post...
Posted by RichardSiddaway | with no comments

Delete Access Table

This times lets go mad and delete a whole table. 001 002 003 004 005 006 007 008 009 010 011 function   Remove-AccessTable   { [ CmdletBinding ( SupportsShouldProcess = $true ) ] param   (     [string] $table ,    ...
Posted by RichardSiddaway | with no comments

Delete an Access Column

We have seen how to add a column to our access database – what about removing a column? 001 002 003 004 005 006 007 008 009 010 011 012 function   Remove-AccessColumn   { [ CmdletBinding ( SupportsShouldProcess = $true ) ] param   (    ...
Posted by RichardSiddaway | with no comments

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

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

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

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

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...
More Posts Next page »