Hi,
I try to display all the soccer matches (from table 1) with at the end of each row, the name of the ref (from table 2)
(Uploaded database to the server = Access)
table 1 (tblmatch) = data about the soccer matches : date, field .... + the number of the ref
table 2 (tblrefs) = all the refs = number, name, phone ....
in table 1, I made a field <ref-id> with the number of the ref for the match (e.g. number 10 for ref. John)
in tabel 2 is also a field with the <refnr> (e.g. for ref. John is the refnr : 10)
I tried the code below, but i receive the follwing error :
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
Thanks for help - Leifoet
Dim adoCon 'Holds the Database Connection Object
Dim rstest 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query for the database
.../...
Set rstest = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblmatch.* , tblrefs.refnr FROM tblmatch INNER JOIN tblrefs ON tblmatch.ref-ID=tblrefs.refnr;"
Do While not rstest.EOF
Response.Write ("<br>")
Response.Write (rstest("date"))
' Response.Write ("<br>")
Response.Write (rstest("field"))
' Response.Write ("<br>")
Response.Write (rstest("ABC"))
' Response.Write ("<br>")
Response.Write (rstest("XYZ")
' Response.Write ("<br>")
Response.Write (rstest("ref-ID"))
' Response.Write ("<br>")
if (rstest("ref_ID"))<> 0 then
Response.Write (rstest("tblrefs.refnr")) 'the error message comes here
' This line of code should be instead of the above => Response.Write (rstest("tblrefs.name"))
end if
Response.Write ("<br>")
rstest.MoveNext
Loop
.../...
I try to display all the soccer matches (from table 1) with at the end of each row, the name of the ref (from table 2)
(Uploaded database to the server = Access)
table 1 (tblmatch) = data about the soccer matches : date, field .... + the number of the ref
table 2 (tblrefs) = all the refs = number, name, phone ....
in table 1, I made a field <ref-id> with the number of the ref for the match (e.g. number 10 for ref. John)
in tabel 2 is also a field with the <refnr> (e.g. for ref. John is the refnr : 10)
I tried the code below, but i receive the follwing error :
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
Thanks for help - Leifoet
Dim adoCon 'Holds the Database Connection Object
Dim rstest 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query for the database
.../...
Set rstest = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblmatch.* , tblrefs.refnr FROM tblmatch INNER JOIN tblrefs ON tblmatch.ref-ID=tblrefs.refnr;"
Do While not rstest.EOF
Response.Write ("<br>")
Response.Write (rstest("date"))
' Response.Write ("<br>")
Response.Write (rstest("field"))
' Response.Write ("<br>")
Response.Write (rstest("ABC"))
' Response.Write ("<br>")
Response.Write (rstest("XYZ")
' Response.Write ("<br>")
Response.Write (rstest("ref-ID"))
' Response.Write ("<br>")
if (rstest("ref_ID"))<> 0 then
Response.Write (rstest("tblrefs.refnr")) 'the error message comes here
' This line of code should be instead of the above => Response.Write (rstest("tblrefs.name"))
end if
Response.Write ("<br>")
rstest.MoveNext
Loop
.../...