Code Project

Link Unit

Sunday, March 29, 2009

Provider error '8007000e' , Not enough storage is available to complete this operation

Problem :
I was facing "Provider error '8007000e' , Not enough storage is available to
complete this operation." error in vbscript of an classic asp application.

code was as below-

set rsGetEnquiryInfo = server.CreateObject("Adodb.Recordset")
rsGetEnquiryInfo.Open strSql,conn,3,1
dim intFieldCount, intCounter
if not((rsGetEnquiryInfo.BOF) and (rsGetEnquiryInfo.EOF)) then
intFieldCount = rsGetEnquiryInfo.GetRows() '--- getting error at this line
end if

Solution:
MDAC version should be 2.8 +
The version information is found in the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess\FullInstallVer
To check the registry, follow these steps:
• On the Start menu, click Run.
• In the Open text box, type regedit and then click OK; this starts Registry Editor.
In the Navigation pane, drill-down to the following path:
HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess
• In the Details pane, look in the Name column for FullInstallVer and Version. Each of these keys will have corresponding version information in the Data column.
• When finished, click Exit on the Registry menu to close Registry Editor.

Setting the rsGetEnquiryInfo object to nothing should solve the error.

Wednesday, March 11, 2009

ValidationSummary displayed multiple times in UpdatePanel

While working on a ASP.Net Web Application , we faced a peculiar situation where the validationsummary is displayed many times. Googled around a bit for the solution and this is what I found , I hope this help visitors also.


Asp.net comes is really good with the Validation Controls. For example the RequiredFieldValidator is perfectly suited because it displays a little error message for the control it validates.

All is fine until you have 40-50 fields that have to be filled out. In this case it's of good practice to use the ValidatioSummary control which summarises all the error messages from the ValidationGroup and shows them either in text on the page or as a Javascript alert().

All is fine until you use the ValidationSummary inside an UpdatePanel, where something rather interesting happens. The alert box is displayed multiple times. When I got this behaviour it was even more interesting that the number of times the alert box is displayed was not constant.

But there is a correlation between the number of times the alert is displayed and the number of asynchronous postbacks in that UpdatePanel. The ValidationSummary alert() is displayed exactly the number of asychronous postbacks times plus one.
0 postbacks --> 1 alert
2 postbacks ---> 3 alerts

Solution
To avoid this behaviour you only have to place the ValidationSummary outside the UpdatePanel, this will prevent it from reregistering itself for validation on each asynchronous postback.