asp_databases thread: error '80004005', Unknown function name
Message #1 by "Jose" <jose_bueno@c...> on Thu, 19 Oct 2000 14:49:06 +0100
|
|
very strange error... I'm attempting to insert a record into a pretty
simple table using, of course, the AddNew function of the recordset
object. Similar code works perfectly in one page in on the same server,
as do the examples from the book, Beginning ASP. This snippet, however,
does not want to play nice.
Select Case strAction
Case "Add"
Dim objRS
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "IntDocList", strConnSvy, adOpenDynamic, adLockOptimistic,
adCmdTable
objRS.MoveLast
objRS.AddNew
objRS("DocID") = strDocID
objRS("LinkLoc")= strDocLoc
objRS("OriginalName")= strDocName
objRS("AddedBy")=strUname
objRS.Update
objRS.Close
End Select
ERROR----------------------
Microsoft JET Database Engine error '80004005'
Unknown function name
/ea/AddRemDocs.asp, line 33
I finally determined that the addnew fuction was the one referred to by
the error. Try as I might (accounting for nulls, temporarily diabling
relationships and required fields, repairing the db, re-writing the page
from scratch, modifying the working code with the required info,etc.) I
cannot figure our why this isn't working. Is there any glaring omission
that I'm just not seeing?
Message #2 by Nisha Nambiar <nishanam@y...> on Thu, 19 Oct 2000 09:53:34 -0700 (PDT)
|
|
Jose
everything looks fine. Just try taking off the
objRS.MoveLast from your code.
Also AddNew is an ADODB.recordset method.
Check if the error is refering to it or not.
Nisha
--- Jose <jose_bueno@c...> wrote:
> very strange error... I'm attempting to insert a
> record into a pretty
> simple table using, of course, the AddNew function
> of the recordset
> object. Similar code works perfectly in one page in
> on the same server,
> as do the examples from the book, Beginning ASP.
> This snippet, however,
> does not want to play nice.
>
> Select Case strAction
>
> Case "Add"
> Dim objRS
> Set objRS = Server.CreateObject
> ("ADODB.Recordset")
> objRS.Open "IntDocList", strConnSvy,
> adOpenDynamic, adLockOptimistic,
> adCmdTable
> objRS.MoveLast
> objRS.AddNew
> objRS("DocID") = strDocID
> objRS("LinkLoc")= strDocLoc
> objRS("OriginalName")= strDocName
> objRS("AddedBy")=strUname
> objRS.Update
> objRS.Close
>
> End Select
>
> ERROR----------------------
>
> Microsoft JET Database Engine error '80004005'
>
> Unknown function name
>
> /ea/AddRemDocs.asp, line 33
>
> I finally determined that the addnew fuction was the
> one referred to by
> the error. Try as I might (accounting for nulls,
> temporarily diabling
> relationships and required fields, repairing the db,
> re-writing the page
> from scratch, modifying the working code with the
> required info,etc.) I
> cannot figure our why this isn't working. Is there
> any glaring omission
> that I'm just not seeing?
>
Message #3 by "Jose Bueno" <Jose_Bueno@c...> on Thu, 19 Oct 2000 21:29:21 +0100
|
|
As it turns out, after a few hours of hair pulling, rewriting, trying
suggestions forwarded by many people with no success, it turns out that I
shot myself in the foot. The UName field in the table was set to have a
default value derived from the Environ("username") function, which is not,
obviously, a supported function.
Thanks!
|