Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Error


Message #1 by "Paul Dees" <pauldees@e...> on Mon, 14 May 2001 11:13:58 +0700
Someone could help me out on this error message while running viewprofile.asp which explaines in Begging
ASP Database book

thanx



7	Error Type:

Microsoft VBScript runtime (0x800A005E)

Invalid use of Null: 'Replace'

/thaipackupdate/search/nonmember/viewprofile.asp, line 89



7	Browser Type:

Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) 



Message #2 by "Ken Schaefer" <ken@a...> on Tue, 15 May 2001 12:58:03 +1000
This is a multi-part message in MIME format.



------=_NextPart_000_0292_01C0DD3E.AD9E2FB0

Content-Type: text/plain;

	charset="Windows-1252"

Content-Transfer-Encoding: quoted-printable



You are probably trying to do a Replace() on a NULL value.



From the VBScript docs:



Return Values

  Replace returns the following values:

        If Replace returns

        expression is zero-length Zero-length string ("").

        expression is Null An error.

        find is zero-length Copy of expression.

        replacewith is zero-length Copy of expression with all 

occurences of find removed.

        start > Len(expression) Zero-length string.

        count is 0 Copy of expression





  Since you are doing a Replace on a NULL< an error is returned. I 

suggest you try testing for NULL before doing the Replace()



  If not isNull(strVar) then



      strVar =3D Replace(strVar, "foo", "bar")



  End If







  Cheers



  Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message -----

From: "Paul Dees" <pauldees@e...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Monday, May 14, 2001 2:13 PM

Subject: [asp_database_setup] Error





: Someone could help me out on this error message while running 

viewprofile.asp which explaines in Begging ASP Database book

: thanx

:

: 7 Error Type:

: Microsoft VBScript runtime (0x800A005E)

: Invalid use of Null: 'Replace'

: /thaipackupdate/search/nonmember/viewprofile.asp, line 89

:

: 7 Browser Type:

: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

:

:

: ---

: STAY UP TO DATE ON ASP.NET, C#, VB.NET, SQL and XML

: Developersdex indexes over 100 of the top ASP, SQL, VB

: and XML sites bringing in more than 5,000 new resources

: every day.  They even integrate all the top .NET

: newsgroups so you can search/post/reply across

: multiple newsgroups within their site.  The next time

: you want to find an answer on ASP, C#, SQL, VB or XML

: think of Devdex!  http://www.developersdex.com/



ken@a...


$subst('Email.Unsub')







  Return to Index