Home > ASP Development > Trouble Passing Parameters

Trouble Passing Parameters



I am receiving the error message on my update form: "Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. "



I can tell the parameter is getting passed because in the address bar it shows it getting passed: "http://###.###.#.#/AAAA/Update_Parts.asp?AutoNum=144"



I double checked the form passing the parameter, here is the link to passing the parameter:




Code:


<A HREF="Update_Parts.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "AutoNum=" & Parts.Fields.Item("AutoNum").Value %>">M</A> 






I believe it has something to do with my Select Statement for Update_Parts.asp, here it is:






Code:


SELECT Parts.*, Departments.*, Subtitles.*
FROM (Departments INNER JOIN Parts ON Departments.ID = Parts.Department) INNER JOIN Subtitles ON (Subtitles.StID = Parts.Sbtitle) AND (Departments.ID = Subtitles.Departs)
WHERE AutoNum = MMColParam








Any help would be appreciated here.



ASP VB w/ Microsoft Access Database

    
Guest


your sql statement looks all over the place. What I surgest is create the query in access and thenn view the sql value in access annd copy and paste it into your page. if your unsure what i mean post ur db with the three tables and i'll show you. o by the way which table has the field AutoNum?

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by markoc
your sql statement looks all over the place. What I surgest is create the query in access and thenn view the sql value in access annd copy and paste it into your page. if your unsure what i mean post ur db with the three tables and i'll show you. o by the way which table has the field AutoNum?




I have tried this already and received the same error. Basically the Select statement you are looking at is from the Access Database query. Everything works fine when I test the select statement in Macromedia and in Access, but once posted to my FTP site, I do not get what I am looking for.



AutoNum is from table Parts.

Was this answer helpful ? Yes No   
Guest


looking at ur use of HTMLEncode think u've got i wrong. are u sending this link Cross-Sites? cause if ur not u don't really need it?

what are the values of MM_keepURL and MM_joinChar?



well from what ur saying it sound like thhe DB on the FTP site is wrong somewhere. I would get a copy of the db from the ftp site and check it. i have slightly rewritten ur sql statement with the correct syntax.




Code:



"SELECT Parts.*, Departments.*, Subtitles.*, Parts.AutoNum" _
& " FROM Subtitles INNER JOIN (Departments INNER JOIN Parts ON Departments.ID = Parts.Department) ON (Subtitles.Departs = Departments.ID) AND (Subtitles.StID = Parts.Sbtitle)" _
& " WHERE (((Parts.AutoNum)=" & MMColParam & "))"



Was this answer helpful ? Yes No   
Guest


It turns out the problem was not with my select statment, it had to do with my dynamic lists function for my two drop down lists, so once I fixed it it worked fine.



Thank you for all the help.



Stacey

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved