Jump to content

800a0bb9 Arguments are of the wrong type


Recommended Posts

Okay I am trying to write functions to reduce the amount of connections to the database and make my code simpler and shorter. So I have created a file that will be included that has some of the functions I have been testing out.This is the error I get

ADODB.Recordset800a0bb9Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another./DragonCraft/Includes/combat_functions.asp 15
And here is the code:
<%'Functions for combat written by Glorfindel on August 21, 2011Function openconnection(database)set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "" & database & ""End FunctionFunction MonsterHP(ID)openconnection("C:\Databases\DragonKwest.mdb")set rs = Server.CreateObject("ADODB.recordset")sql="SELECT Health From Monsters WHERE [ID]=" & ID & ""rs.open sql, conndo until rs.EOFfor each x in rs.FieldsMonsterHP = x.value nextrs.MoveNextlooprs.closeconn.closeEnd Functionresponse.write MonsterHP(1)%>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...