Weird error... Type mismatch: '[String: TrueTr

Results 1 to 3 of 3

Thread: Weird error... Type mismatch: '[String: TrueTr

  1. #1
    Fuji Guest

    Default Weird error... Type mismatch: '[String: TrueTr

    here&#039s the copy and pasted version of the error...<BR><BR> Microsoft VBScript runtime error &#039 800a000d&#039 <BR><BR>Type mismatch: &#039[string: "TrueTrue"]&#039 <BR><BR>/joincheck.asp, line 97<BR><BR>Now reader of this post, you&#039re probably wondering what line 97 is. Well, it&#039s marked off with *** wraped around it... like this *** line 97 ***<BR><BR>Set Conn= server.createobject("ADODB.Connection")<BR><BR>Con "Driver={Microsoft Access Driver (*.mdb)};" & "DBQ=C:webpubdbmoneyviewdb.mdb"<BR><BR>SQL="SE LECT mail FROM CoustomerInfo WHERE mail = &#039" & mail & "&#039"<BR><BR>set rst = conn.Execute(SQL)<BR><BR>***if rst.bof & rst.eof then nerror = false else nerror = true***<BR><BR>if nerror = "true" then<BR>Session("nerror") = "The email you entered; " & mail &", is already in our database, if this is an error, please mail;/a&#062;"<BR><BR>conn.close<BR><BR>response.redirec t("join.asp")<BR>end if<BR><BR>that&#039s just an exerpt (did I spell that right?) of a larger file. If you need more, or the whole thing, e-mail me at or just respond here. Thanks a lot.

  2. #2
    Join Date
    Dec 1969

    Default Been doing JS or C++ too much?

    You&#039re going to love this one:<BR><BR>In VBScript, the & operator ALWAYS ALWAYS ALWAYS means string concatenation. It does NOT mean "and" as it does in C/C++/Java/JavaScript.<BR><BR>So this:<BR> &nbsp; if rst.bof & rst.eof then nerror = false else nerror = true<BR><BR>Becomes<BR> &nbsp; If true & true then...<BR>and that becomes (because & forces STRING concatenation!)<BR> &nbsp; If "True" & "True" then ...<BR><BR>You *must* use the word AND in VBScript.<BR><BR>HOWEVER... You are making this way too hard.<BR><BR>Try this:<BR><BR> &nbsp; nerror = NOT (rst.bof AND rst.eof )<BR><BR>No "If" test needed.<BR><BR>

  3. #3
    Fuji Guest

    Default RE: Been doing JS or C++ too much?

    I am in your debt...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts