New Author for Imar.Spaanjaars.Com

Posted by: Imar Spaanjaars at Thursday, April 15, 2004 3:12:08 PM in: Imar's Blogs
I would like to welcome a new author for my Web site. Peter Lanoie has offered to contribute articles and FAQs to my Web site whenever he finds something interesting to write about.
Read on ...

How can I make a class variable accessible from different object instances of the same class?

Posted by: Peter Lanoie at Wednesday, April 14, 2004 8:52:52 PM in: ASP.NET 1.x
You may have the need to be able to access the same instance of a class variable from multiple object instances of that class. This is known as a "class" scope variable. Here I'll explain how it's done.
Read on ...

How Do I Enable Visual Styles in My .NET Win Forms Application?

Posted by: Imar Spaanjaars at Tuesday, April 13, 2004 10:39:36 AM in: .NET Win Forms
With the .NET Framework 1.0 it was already possible to enable Visual Styles for your .NET Windows Forms so the application took on that shinny new Windows XP look. Enabling Visual Styles was quite a hassle, though. You had to create a manifest file that contained a lot of gobbledygook and it wasn't as straight-forward as you'd hope.
With the .NET Framework 1.1, however, things have become much easier.
Read on ...

How do I Handle Errors and Send an Error Notification from ASP.NET Applications?

Posted by: Peter Lanoie at Monday, April 12, 2004 8:23:26 PM in: ASP.NET 1.x
How do I set up my ASP.NET Web application to notify me with the details of an error when one occurs on my Web site? And how do I give the user a friendly message telling them an error has occurred?
Read on ...

How Do I Retrieve the Location of the Temp Folder for the Current User?

Posted by: Imar Spaanjaars at Sunday, April 11, 2004 1:24:33 PM in: VB.NET
When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g. C:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.
Read on ...

How Do I Retrieve the Location of the Temp Folder for the Current User?

Posted by: Imar Spaanjaars at Sunday, April 11, 2004 1:21:19 PM in: C#
When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g. D:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.
Read on ...

I Have Added a New and Useless Feature to the Site

Posted by: Imar Spaanjaars at Tuesday, April 06, 2004 10:31:21 PM in: Imar's Blogs
Regular visitors may have noticed a new feature on the details page for articles, news and other categories of the site. The Details section of the page now has a Listened To item.
Read on ...

How Do I Get Detailed Information About Errors in ASP or ASP.NET Pages?

Posted by: Imar Spaanjaars at Wednesday, March 31, 2004 8:48:04 AM in: ASP 3.0

When you are trying to debug your ASP or ASP.NET pages, it's important to get detailed information about your errors. Knowing the cause of the error is often the biggest part of solving the problem.
By default, Internet Explorer will hide most of the raw error message from you, and instead will give you a “Friendly” HTTP error message. This FAQ will show you how to disable this feature so you can see the original error that the ASP run-time threw at you. This will help tremendously in debugging your ASP applications.

Read on ...

How Do I Fix ASP 80004005 errors?

Posted by: Imar Spaanjaars at Sunday, March 28, 2004 7:56:46 PM in: Security

When you're working with ASP or ASP.NET applications and a Microsoft Access database, you're likely to run into an error like this:

Microsoft JET Database Engine error '80004005'

The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\YourSite\Databases\YourDatabase.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

/YourSite/YourDataAccessPage.asp, line 15

Alternatively, you may get this error instead:

Microsoft JET Database Engine error '80004005'

Operation must use an updateable query.

/YourSite/YourDataAccessPage.asp, line 15

Both errors basically mean the same: the account that your Web server is running under does not have the necessary permissions to read from or write to the database.

This article will explain the steps you need to perform to fix this problem. First I will explain how you can find out the current account that the Web server is using to connect to the database. In the second part of the article I'll explain how to change the security settings so the Web server can successfully access the database.

Read on ...

Find Out Whether a Specific Column Exists in a Database Table

Posted by: Imar Spaanjaars at Monday, March 15, 2004 3:33:05 PM in: Classic ASP
This snippet will allow you to check whether a certain column exists in a database table or not. Useful when you're coding against a database which schema you don't fully know. Just change the name of the column you're looking for (nameToCheck), the Connection String and the SQL SELECT statement, the bold items in this snippet.
Read on ... 12345678910111213141516171819202122232425262728293031