Hello,

I have an error: Microsoft VBScript runtime error '800a000d'

Type mismatch: 'OpenDB' and it says to go line 4 on the page with the error
here are the 1st 4/5 lines of code that I have

<%
If Request.Form("Operation") <> "Create" AND Request.Form("Operation") <>
"Edit" And Request.Form("Operation") <> "Print" Then

Call OpenDB(SQLConn)

Set RS = Server.CreateObject("ADODB.RecordSet")

'----- Find Number of questions
tempQuestionCount = SQLConn.Execute("Select Count(ID) From PM_Questions")
Session("QuestionCount") = tempQuestionCount(0)


Line 4 is Call OpenDB(SQL Conn)

Do you know what can be the problem ?

Re: Microsoft VBScript runtime error '800a000d' by Ronx

Ronx
Fri Nov 10 13:03:56 CST 2006

SQLconn appears to be a variable with no value given to it.
The code should either be
Call OpenDB("SQLConn") where "SQLConn" is a string - perhaps the name
of a database,
Or you should assign a value to SQLConn before using it.

Example: SQLConn = "myDataBase"
The actual value depends on what the sub OpenDB does with it.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



"jojo" <jojo@discussions.microsoft.com> wrote in message
news:D34BDC0F-8345-4FEA-AC31-F3E40F769868@microsoft.com:

> Hello,
>
> I have an error: Microsoft VBScript runtime error '800a000d'
>
> Type mismatch: 'OpenDB' and it says to go line 4 on the page with the error
> here are the 1st 4/5 lines of code that I have
>
> <%
> If Request.Form("Operation") <> "Create" AND Request.Form("Operation") <>
> "Edit" And Request.Form("Operation") <> "Print" Then
>
> Call OpenDB(SQLConn)
>
> Set RS = Server.CreateObject("ADODB.RecordSet")
>
> '----- Find Number of questions
> tempQuestionCount = SQLConn.Execute("Select Count(ID) From PM_Questions")
> Session("QuestionCount") = tempQuestionCount(0)
>
>
> Line 4 is Call OpenDB(SQL Conn)
>
> Do you know what can be the problem ?


Re: Microsoft VBScript runtime error '800a000d' by David

David
Fri Nov 10 14:40:11 CST 2006

What's the code for the function OpenDB that you're passing SQLConn to?



"jojo" <jojo@discussions.microsoft.com> wrote in message
news:D34BDC0F-8345-4FEA-AC31-F3E40F769868@microsoft.com...
> Hello,
>
> I have an error: Microsoft VBScript runtime error '800a000d'
>
> Type mismatch: 'OpenDB' and it says to go line 4 on the page with the
> error
> here are the 1st 4/5 lines of code that I have
>
> <%
> If Request.Form("Operation") <> "Create" AND Request.Form("Operation") <>
> "Edit" And Request.Form("Operation") <> "Print" Then
>
> Call OpenDB(SQLConn)
>
> Set RS = Server.CreateObject("ADODB.RecordSet")
>
> '----- Find Number of questions
> tempQuestionCount = SQLConn.Execute("Select Count(ID) From PM_Questions")
> Session("QuestionCount") = tempQuestionCount(0)
>
>
> Line 4 is Call OpenDB(SQL Conn)
>
> Do you know what can be the problem ?