Hi and tnx for reading my post..
I am complete stuck at this error.. i have searched the net for this, found some matches but i cannot seem to understand what's wrong with this code...
If someone got any clue how to fix this i will be *forever* happy !!
PS! Full paste of code on the bottom of the post. Using the webwizguide code at url :
http://www.webwizguide.com/asp/tutor...m_database.asp
I get the error :
-----------START--------------
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/psy/delete_select.asp, line 18
-----------END--------------
when i'm trying to get the ID_no. (.. i think that's the problem..)
Here is line nr 18 :
-------------START-------------------------
Response.Write ("<a href=""delete_entry.asp?ID=" & recset("ID_no") & """>")
--------------END---------------------------
----------- FULL CODE --------------------
Dim conn
Dim recset
Dim sSql
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=PsyDb"
Set recset = Server.CreateObject("ADODB.Recordset")
sSql = "SELECT Album.* FROM Album;"
recset.Open sSql, conn
Do While Not recset.EOF
Response.Write ("<br>")
Response.Write ("<a href=""delete_entry.asp?ID=" & recset("ID_no") & """>")
Response.Write (recset("Artist"))
Response.Write ("</a>")
Response.Write ("<br>")
Response.Write (recset("Alb"))
Response.Write ("<br>")
recset.MoveNext
Loop
recset.Close
Set recset = nothing
Set conn = nothing
---------------END FULL CODE---------------------
--------- START DELETE_ENTRY.ASP CODE -------------
Dim conn
Dim rsDeleteEntry
Dim sSql
Dim lngRecordNo
lngRecordNo = CLng(Request.QueryString("ID"))
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=PsyDb"
Set rsDeleteEntry = Server.CreateObject("ADODB.Recordset")
sSql = "SELECT Album.* FROM Album WHERE ID_no=" & lngRecordNo
rsDeleteEntry.Locktype = 3
rsDeleteEntry.Open sSql, conn
rsDeleteEntry.Delete
Set rsDeleteEntry = nothing
Set conn = nothing
Response.Redirect "delete_select.asp"
-------------END-----------------------------------