Ask a Question related to Dreamweaver AppDev, Design and Development.
-
btn #1
What is wrong with this recordset? Expert help needed..
Hi - using ASP/Access/Vbscript
Using the recordset below to insert a hit in my database each time the page is
viewed by a user.
Like a "how many times page is displayed record".
But sometimes the whole webpage crashes. It started to happen after I used
this recordset, so I think that it may be the reason.
Is there an expert out there that can look at it an tell me if the recordset
is ok or bad.
Here it is; (viewCount is the DB table that holds the hits).
<%
Dim profiler
Dim profiler_numRows
Set profiler = Server.CreateObject("ADODB.Recordset")
profiler.ActiveConnection = MM_mypage_STRING
profiler.Source = "SELECT * FROM profiler WHERE ID = " +
Replace(profiler__MMColParam, "'", "''") + ""
profiler.CursorType = 0
profiler.CursorLocation = 2
profiler.LockType = 3
profiler.Open()
profiler("ViewCount") = profiler.Fields.Item("ViewCount").Value + 1
profiler.Update
profiler_numRows = 0
%>
Any comments? Other way to do this?
Bjorn.
btn Guest
-
Some Guidance from an expert needed for beginner...
Over the last couple of days I have been reading through the documentation to try to find a solution for a project I am working on and I was hoping... -
Expert opinion needed: web services
I want to (a) capture every SOAP request and log them and (b) implement security for a web service which just entails hitting a database for a... -
Expert needed: Help with uploading a file
Hello, We have some code (see below) that has been working intermittently and I was wondering if someone had a better approach or an idea on why... -
File IO expert needed
I need to learn from someone how to do the following: -a sprite gets clicked // this causes a cell on a pre-made Access spreadsheet to add 1, and... -
Select DISTINCT issue (SQL Expert needed)
I have a database that I'm pulling out to an ASP page... I am looking for a wildcard string in a field. If the wildcard is found I just want ONE... -
Chris In Madison #2
Re: What is wrong with this recordset? Expert help needed..
I think the correct syntax is:
profiler.Fields("ViewCount") = profiler.Fields.Item("ViewCount").Value + 1
Just a wild guess, however, according to this code sample at ASP101:
[url]http://www.asp101.com/samples/viewasp.asp?file=db%5Fupdate%2Easp[/url]
Best regards,
Chris
Chris In Madison Guest



Reply With Quote

