Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 3rd, 2006, 01:56 PM
Registered User
Join Date: Feb 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Writing Variables to an access database

Good morning,

I am very new to asp and database connections.

I'm trying to take a set of variables and write them to an access 2000 database. My database name, table name, variable and table column names are all correct as far as I can tell, but when I try to post the data to the database I get the following error:

Unable to post test data to host, cannot submit results! Server returned HTTP response code: 500 for URL: http://numdet01/courses/test/iron/submit.asp

The http path above is the correct path to the submit.asp file. Below is the text from this file:

DIM addstuff

Set addstuff=Server.CreateObject("adodb.connection")
addstuff.ConnectionString="Provider=Microsoft.Jet. OLEDB.4.0;Data Source="&Server.MapPath("db/n395aeval.mdb") & "Persist Security Info=False"


varfinal_score=request.querystring("varfinal_score ")
varelapsedtime=request.querystring("varelapsedtime ")
varcurrentdate=request.querystring("varcurrentdate ")
varcurrenttitlename=request.querystring("varcurren ttitlename")
varcurrenttitlename= Replace(varcurrenttitlename, "'", "~")
firstname= Replace(firstname, "'", "~")
lastname= Replace(lastname, "'", "~")

sqladd="INSERT INTO MAIN (varfinal_score,employeeid,varelapsedtime,varcurre ntdate,varcurrenttitlename,firstname,lastname) VALUES ('"&varfinal_score&"','"&employeeid&"','"&varelaps edtime&"','"&varcurrentdate&"','"&varcurrenttitlen ame&"','"&firstname&"','"&lastname&"')"

Set addstuff= Nothing

Any suggestions would be most appreciated!

Thank you!

Reply With Quote
  #2 (permalink)  
Old February 3rd, 2006, 07:48 PM
Authorized User
Join Date: Feb 2006
Location: Verona, Italy, Italy.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts

Hi dsargent

You Set AddStuff connection bat Where is Recrodset ?

Set Rs = addstuff.execute(sqladd) 

Set RS = Nothing
Set addstuff= Nothing
And Column "varcurrentdate" is text o Date/time ?
Because if Date/time #"& varcurrentdate &"#

Ciao :D

I don’t Speak English very well, excuse me !

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble writing to an Access Database JAdkins Classic ASP Basics 5 June 27th, 2007 03:05 PM
writing to a ms access database angel79 Classic ASP Databases 2 May 25th, 2005 11:03 AM
Writing Variables in iFRAMES with Mouseover Brian_____ Javascript How-To 3 May 26th, 2004 11:04 PM
Writing to access database from asp.et RaZorCleaN Access 2 October 9th, 2003 01:16 PM

All times are GMT -4. The time now is 01:17 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.