Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

querying access database

Status
Not open for further replies.

Kris912

Programmer
Jul 29, 2005
27
US
I am trying to use an asp upload function. I am basing the image upload on the ID in the RS.

ID = upload.form("ID")
Title = replace(trim(Upload.form("Title")),"'","''")
EventDate = Upload.form("EventDate")
Description = replace(trim(Upload.form("Description")),"'","''")
Notes = replace(trim(Upload.form("Notes")),"'","''")


Does it make sense to query it this way and is this the proper syntax?

sql = "select ID from Events where ID= " & ID

ID is a hidden field in my form so is it being passed correctly?

I originally was querying the database this way:

sql = "select ID from Events where Title='" & Title & "'"
set rs = connection.execute(sql)

I don't get any error messages this way and it makes sense to me that it would pull the correct ID but it isn't uploading the pics. Please look at thread 333-1111650 for the full code I posted yesterday.

Thanks for all your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top