Jump to content

800a0bb9 Arguments are of the wrong type


Striped Fish2

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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...