Running the code below spits out the following error:
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/gallery_default.asp, line 52
The code is below line 52 is in bold.
<%
Set objRs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT tblGallery.* FROM tblGallery ORDER BY gallery_id ASC;"
With objRs
.CursorType = 3
.LockType = 2
.Open strSQL, strCon
End With
Set objRs2 = Server.CreateObject("ADODB.RecordSet")
If NOT objRs.EOF Then
For intLoopCount= 1 to 20
If objRs.EOF Then Exit For
intGallery = CInt(objRs("gallery_id"))
Response.Write(".: <a class=""lgLink"" href=""gallery_list.asp?Gallery=" & intGallery & "&GalleryTitle=" & objRs("gallery_title") & """>" & objRs("gallery_title") & "</a> :.<br>")
strSQL2 = "SELECT TOP 5 tblGalSubCat.* FROM tblGalSubCat WHERE gal_sub_cat_of = '" & intGallery & "' ORDER BY gal_sub_cat_date DESC;"
With objRs2
.CursorType = 3
.LockType = 2
.Open strSQL2, strCon
End With
Response.Write("intGallery = " & intGallery & "")
If NOT objRs2.EOF Then
For intLoopCount2 = 1 to 5
If objRs2.EOF Then Exit For
Response.Write("" & vbTab & ".: <a class=""smLink"" href=""gallery_show.asp?SubCat=" & objRs2("gal_sub_cat_id") & """>" & objRs2("gal_sub_cat_title") & "</a> :. ")
objRs2.MoveNext
Next
objRs.MoveNext
End If
Next
End If
%>
I have triple checked the speeling of table names and data types and it is all alright. This is really bugging me, so any help would be greatly appreciated!!!