The follwing is in Session_Onstart
I know the connectionstring is correct because it works on other pages.
I simply want to add a record to do_userlog
---------------------------------------------------------------------
dim TimeSt
dim sq
dim sqlstr
sq = chr (39)
TimeSt = now
session ("connectionstring") = "Provider=SQLOLEDB.1; Data Source=xxxxx;
Initial Catalog=xxxxx; User ID=xxxxx;Password=xxxxx"
set objconn = server.createobject ("ADODB.connection")
set objrec = server.createobject ("ADODB.recordset")
objconn.connectionstring = session ("connectionstring")
sqlstr = "insert into do_userlog (timdate, logid, password, viewed) values
("
'sqlstr = sqlstr & sq & timest & sq & "," & sq & "0101150" & sq & "," & sq &
"004650" & sq & "," & sq & "F" & sq & ")"
sqlstr = "select * from do_events order by postdate desc"
objconn.open
objrec.open sqlstr, objconn, adOpenStatic, adLockReadOnly
set objrec = nothing
set objconn = nothing
----------------------------------------------------------------------------
--
The following error is returned
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/LM/W3SVC/1002338185/Root/global.asa, line 48
----------------------------------------------------------------------------
---
so, to simplify for troubleshooting I change sqlstr to sqlstr = "select *
from do_events order by postdate desc"
which works fine on other pages, and I receive exactly the same error.
-dmd-
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Yes. What do you want to, exactly? You can open an ADO connection,
execute a query, close and destroy your connection in Session_onStart, for
example, if you choose.
Ray at work
"Mac Davis" <ne**@blindsided.org> wrote in message
news:uM**************@TK2MSFTNGP12.phx.gbl... Is it possible to use ADO in global.asa?
I simply want to creat a log of each visit to the site?
Thanks,
-dmd-