upstreamaccess
01-12-2007, 10:04 PM
Every time I think I figure something out, I get tangled up.
I was first helped with overcoming the error, "Either EOF or BOF..." error by adding an if/then/esle/end if statement.
I no longer get an error when there isn't a matching record, but now when a record matches I get this.
Wrong number of arguments or invalid property assignment: 'Fields.Item(...).Value'
Please let me know what to do next
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ProjexDB.asp" -->
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_ProjexDB_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Status WHERE Customer = 'asd'"
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<%
if Recordset1.EOF and Recordset1.BOF then
response.Write ("Empty")
else
Recordset1.Fields.Item("Customer").Value
end if
%>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
I was first helped with overcoming the error, "Either EOF or BOF..." error by adding an if/then/esle/end if statement.
I no longer get an error when there isn't a matching record, but now when a record matches I get this.
Wrong number of arguments or invalid property assignment: 'Fields.Item(...).Value'
Please let me know what to do next
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ProjexDB.asp" -->
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_ProjexDB_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Status WHERE Customer = 'asd'"
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<%
if Recordset1.EOF and Recordset1.BOF then
response.Write ("Empty")
else
Recordset1.Fields.Item("Customer").Value
end if
%>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>