473,574 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

running a script from a page I was redirected to


I'm developing a site with a public and members section. I'm using
vbscript, asp, and an access database. The login page is processed by
the members page. If you are a valid member the member page loads.
If not the member page redirects you to the restricted access page.

On the restricted access page I want to run a script that records
information about the user trying to login. I'm using environment
variables for this. The data is captured fine but my sql query isn't
working. I can't see any restricted words in there and I don't know
why the script won't run....any help would be appreciated.


sql = "insert into tblfailedlog accessdate = '" & now() & "',
path_info = '" & request.serverv ariables("path_ info") & "',
remote_addr = '" & request.serverv ariables("remot e_addr") & "',
remote_host = '" & request.serverv ariables("remot e_host") & "',
request_method = '" & request.serverv ariables("reque st_method") & "',
script_name = '" & request.serverv ariables("scrip t_name") & "',
server_port = " & request.serverv ariables("serve r_port") & ",
server_port_sec ure = " & request.serverv ariables("serve r_port_secure")
& ", server_protocol = '" & request.serverv ariables("serve r_protocol")
& "', http_accept_lan guage = '" &
request.serverv ariables("http_ accept_language ") & "', http_host = '" &
request.serverv ariables("http_ host") & "', http_referer = '" &
request.serverv ariables("http_ referer") & "', http_user_agent = '" &
request.serverv ariables("http_ user_agent") & "';"

set rs = conn.execute(sq l)

even when I change the sql statement to:
sql = "insert into tbltest testdata = '" & testdata & "';"
doesn't work either.

All my other pages are working fine - inserting, updating, deleting,
and selecting.

any help would be greatly appreciated.

Nov 12 '05 #1
2 1357
I've written very little asp so don't take the following too seriously.
set rs = conn.execute(sq l)
No recordset will be returned so I usually use just
conn.execute(sq l)

I don't recognize the syntax of the 'insert into' sql statement
sql = "insert into tbltest testdata = '" & testdata & "';"

I would normally use something like

strTest = "my test"
strSQL = "INSERT INTO tblTest (Field1) VALUES('" & strTest & "')"

Nov 12 '05 #2
Hi Peter, thanx for your reply

I've used set rs = conn.execute(sq l) on ALL of my other pages and this
works perfectly because I can reference whichever query I need to using
the record set name.

I've also tried using the query string with the syntax you suggested and
that returned the same results.

I'm really at ends with this code because as I said, it works fine on
other pages.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Phil Powell | last post by:
http://www.sitepoint.com/article/910/2] How can it be possible to use Apache's mod_rewrite module in such a way as to dynamically feed it variable information into the "RewriteRule" option? I am having to get info from a db call and then feed it into RewriteRule since the rule will be, to a degree, dynamic. Is this what I would be doing;...
by: Max | last post by:
Hello all, I am trying to protect a page within my site with a JS password scheme. Now I know JS can be quite easily "circumvented", but I came by a code below. My question is: 1. Is there a way to find a password for this script? How easily? 2. Is there a stronger scheme available in JS?
by: Supaya | last post by:
Hi, I'm developing a site with a public and members section. I'm using vbscript, asp, and an access database. The login page is processed by the members page. If you are a valid member the member page loads. If not the member page redirects you to the restricted access page. On the restricted access page I want to run a script that...
by: mherman3 | last post by:
I have a page that sends a request to another PHP page on my site. If I try and set the header in the page that is being called, with header(Location: ...), the site doesn't get redirected like I'd like it to, it just writes a response to the original page. The response that it writes is the HTML of the page that I'd like the site to be...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.