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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

odb error in asp cant figure out

Status
Not open for further replies.

gsc123

Programmer
Jan 24, 2008
197
Works on my local machine and when uploaded to website get this error

SELECT songs.[Real Song Name] FROM songs WHERE (((songs.id)=78))
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

/main.asp, line 52


code line with error is - conntemp.Execute(strSql)


id=Request.QueryString("id")
strSql = "SELECT songs.[Real Song Name] FROM songs WHERE (((songs.id)="&id&"))"
Response.Write strSql
set rs = conntemp.Execute(strSql)
mp3 = rs("Real Song Name")
set rs=nothing
strSql = "UPDATE songs SET songs.[count] = songs.[count]+1 WHERE (((songs.id)="&id&"))"
conntemp.Execute(strSql)
url=" Response.Redirect(url)
 
bin ther done that...permission maybe?
 
Count is a reserved word (songs.count). That might screw things up. Also, if you have any aggregate functions in the query (or an underlying query) that would make it unupdateable.


Paul
 
Would this upset an update query?
 
Depending on what it is, any aggregrate funtion will make any query unupdateable as far as I know. I don't know about the using a reserved word like count as a field name.

Paul
 
If the id is a numeric field type you might try adjusting the sytax a little to this.

Code:
strSql = "SELECT songs.[Real Song Name] FROM songs WHERE songs.id= "&id


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top