Dean L Covey
|
| Posted: 08/21/2005, 7:49 AM |
|
The solution has to be something simple. I have tried various versions to ne evail. Not that this is real important, but I am trying to teach myself how to use functions. This page is an includable page and it has a form so it should maintain the db connection. Do I need the form? I think you'll see what I am trying to do. And I am trying to add this data to the db. See below:
<%
Function LogTraffic_AfterInitialize(Sender) 'LogTraffic_AfterInitialize @1-7999F5E6
'Custom Code @2-73254650
Dim Name
Dim SQL
Dim Connection
Dim ErrorMessage
Set Connection = New clsDBConnection1
Connection.Open
For Each Name In Request.ServerVariables
SQL = "INSERT INTO [tblLog] (Var,Val) "&_
"VALUES ("& Connection.ToSQL(Name,cssText) & ","& Connection.ToSQL(Request.ServerVariables(name),cssMemo) &")"
Connection.Execute(SQL)
ErrorMessage = CCProcessError(Connection)
Response.write("<b>"&name)&": "
Response.write(Request.ServerVariables(name) + "<br>")
Next
Connection.Close
Set Connection = Nothing
On Error Goto 0
' -------------------------
'End Custom Code
End Function 'Close LogTraffic_AfterInitialize @1-54C34B28
%>
The response write will be taken out later.
The error message I am getting:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'cssText'
/LogTraffic_events.asp, line 14
|
|
|
 |
Edd
Posts: 547
|
| Posted: 08/22/2005, 5:48 AM |
|
Try CCStext and CCSMemo
Typo's get you every time.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
Dean L Covey
|
| Posted: 08/24/2005, 7:32 PM |
|

Yep, that'll get you every time. Also, I was able to delete the form. This updates the db properly.
|
|
|
 |
|