![]() |
ASP / HTML Links
Is there a way to determine if a user clicks on a link, and if so, update a file / database?
Also, this is more geared to ASP: If you already have an SQL query executed, how can you do another? Example: PHP Code:
|
well, since you already have your connection open couldn't you just make another query and execute it? I'm assuming this sorta behaves like php, but i may be wrong
|
Quote:
"Cannot execute RS, it's already opened" Not exactly like that, but close to it. |
have you tried to change the variable name to RS1 or something of that nature? I'm not exactly sure how ASP handles queries. It may still be trying to get things and continues with the code. THe only other thing i could suggest is close the connection and then open it again, but that seems like a really stupid way to do it.
|
Quote:
|
It might be that the connection opened using the Jet provider can't handle a recordset and an update query at the same time. Just use an implicit connection like this:
Code:
Set MyConn = Server.CreateObject("ADODB.Connection") |
Quote:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e4e' Code:
RS.Open SQL_query, connectString |
odd
I tried it again quickly and it works fine using only one connection. When you use connection.Execute() it returns a forward-only read-only cursor, so the connection should still be able to service other calls. I'm pretty sure its just with Jet though, it works ok here on SQL Server.
Back to your first question. Say you want to let people vote in a poll. You have a table called VOTE with a poll_id pointing to the poll and a code for what they voted for, names vote_code. When you write the links to the screen, use querystrings appended to the URL and point them back to the same page: page filename: poll.asp Code:
Poll Response Links:Code:
<%'local functions |
| All times are GMT -5. The time now is 01:44. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi