CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft VBScript runtime error '800a005e' Invalid use of Null: 'Replace'
- Article ID:
140 - Date Created
Saturday, June 25, 2011 - Last Updated
Saturday, June 25, 2011 - This Article Has been Viewed
3894 times - Short Desc
Functions that are used with unused variables will cause the Invalid use of null 800a005e error. Make sure that all your Function wrapped variables are indeed being used, and if not, then create an IF Statement as demostrated here to conteract the error. - Details
If you use a Function for a 2 or more Created Variable, but only have 1 variable in use of the page, you will receive the following error.
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'Replace'
/Replace.asp, line 51 - Recreate Issue
To recreate this issue.
Scenario #1<%
if getAdmin="About" or getAdmin="Info" then
Set sqlAb = Server.CreateObject("ADODB.Command")
sqlAb.ActiveConnection=objConn
sqlAb.Prepared = true
sqlAb.commandtext="Select SAbout, SInfo from SiteInfo"
set rsAb = sqlAb.execute
if not rsAb.eof then
SAbout = Reverse(rsAb("SAbout"))
SInfo = Reverse(rsAb("SInfo"))
end if
end if
%>
Ok, the Reverse Function used in the create of the above Variables, is used to Reverse
Our SQL Projection script. Now, our page only consist of 1 Form Textarea field, but yet we have 2 Variables that are created for the pages "About" and "Info"
The <textarea><%=SAbout%></textarea>
Scenario #2
If you are using a Function on an Empty record, you will also receive this error. - Resolve Issue
To resolve this issue.
Scenario #1
OK, since we are looking at both pages "About" and "Info", we need to make sure that only one or the other is used when the right page is shown.
<%
if getAdmin="About" or getAdmin="Info" then
Set sqlAb = Server.CreateObject("ADODB.Command")
sqlAb.ActiveConnection=objConn
sqlAb.Prepared = true
sqlAb.commandtext="Select SAbout, SInfo from SiteInfo"
set rsAb = sqlAb.execute
if not rsAb.eof then
if getAdmin="About" then
SAbout = ReverseHelp(rsAb("SAbout"))
elseif getAdmin="Info" then
SInfo = ReverseHelp(rsAb("SInfo"))
end if
end if
%>
Now, in the above we have created an IF Statement, that will display the created Variables for each of our Pages.
Scenario #2
Make sure that your records that are using the Function have data stored in them.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825