1. Using New Data Types in 2008 Andrew Couch UK Access User Group www.ukaug.co.uk ASC associates www.upsizing.co.uk
2.
3.
4.
5. What Data Types do the Products support? Access (2007) GUID Multi-value fields Share Point (2003) see next slide SQL Server (2008) Visual Studio (2005/8) n prefix for Unicode
20. Visual Studio, Images and OLE still a problem with Varbinary(max) some people would suggest that image data should not directly held in the database and instead a text link is used to point to an external image file which works around this issue
32. Access Row Versioning & Timestamps Row Versioning SQLExecDirect: UPDATE "dbo"."authors" SET "au_fname"=? WHERE "au_id" = ? AND "au_lname" = ? AND "au_fname" = ? AND "phone" = ? AND "address" = ? AND "city" = ? AND "state" = ? AND "zip" = ? AND "contract" = ? Timestamps SQLExecDirect: UPDATE "dbo"."authors" SET "au_fname"=? WHERE "au_id" = ? AND "ts" = ? Timestamps improve efficiency and remove potential problems with rounding errors in numerical data
33.
34.
35. Example Visual Studio Update handling Null Values UpdateCommand = "UPDATE [Customers] SET [CompanyName] = @CompanyName WHERE [CustomerID] = @original_CustomerID COALESCE([CompanyName],'') = COALESCE(@original_ CompanyName,'')” For numerics use COALESCE([fieldname],0) For dates use COALESCE([fieldname],’ 1st January 1900’ ) Or ([CompanyName] = @original_CompanyName ) OR ([CompanyName] IS NULL and @original_CompanyName IS NULL) Or use SET ANSI_NULLS OFF