Browse by Tags

02 May 2009
Solution to the “You tried to assign the Null value to a variable that is not a Variant data type.” Exception
By default the DataSource wizard passes parameters for AutoNumber primary keys. If you are getting this error: You tried to assign the Null value to a variable that is not a Variant data type. Then you need to remove that default parameter. This is what Read More...
1 Comments
Filed under: , , , ,
 
02 May 2009
Solution to the “Format of the initialization string does not conform to specification starting at index 0.” Exception
You are probably using the wrong DbConnection class. If you are using Access then make sure you use OleDbConnection, not SqlConnection…and vice versa. Alternatively you could be referencing your MDB file wrong. Here’s the proper way: <connectionStrings> Read More...
2 Comments
Filed under: , , , ,
 
06 April 2009
Solution to “Operation must use an updateable query” Exception when writing to an Access Database from ASP.NET
Could be a couple of things: The file is marked as read-only. Right click on file, uncheck “read only”. The application pool identity doesn’t have write permissions to the folder that contains the MDB. Find the identity of the application pool (using Read More...
03 March 2009
The simplest DataSet to Excel solution
Tim Mackey has a very simple method for converting DataSets to Excel spreadsheets. http://tim.mackey.ie/HowtoExportADatasetToExcelCAspnet.aspx Thanks Tim! Read More...
1 Comments
Filed under: , , ,
 
25 February 2009
Solution to Method has no implementation (no RVA) Error
If you get this exception System.TypeLoadException: Could not load type ‘x’ from assembly 'xx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because the method 'SendMessage' has no implementation (no RVA). Make sure you have a DllImport attribute Read More...
1 Comments
Filed under: ,
 
17 February 2009
Delete all Outlook RSS Feeds
My Outlook RSS Feeds were in a really funky state this morning.  I had to create a new profile and I had RSS Sync enabled.  When that is the case Outlook re-adds all Feeds that you have ever added to the machine back into your profile even if Read More...
0 Comments
Filed under: , , , ,
 
02 December 2007
LINQ: Sequence contains no elements. InvalidOperationException when calling Single
If you call Single to get an object from your DB and the object doesn't exist you will get an InvalidOperationException. return this .DataContext.MemberDaos.Single(m => m.MemberID == id); Instead of Single, use SingleOrDefault, which will return null Read More...
8 Comments
Filed under: , ,
 
01 December 2007
LINQ: "Add" renamed to "InsertOnSubmit"
If you are using LINQ to insert data with RTM bits you won't find the Add method on the DataContext post Beta2. Use the InsertOnSubmit method instead. Read More...
6 Comments
Filed under: , ,
 
06 March 2007
Solution to "is null or not an object" error with ScriptService
I just spent the last few hours trying to track down why I kept getting an "is null or not an object" error when setting up a service with a ScriptService attribute. I started my coding with a PageMethods implementation, but moved to a ScriptReference Read More...
Page view tracker