View Full Version : Ms Access/ADO and JavaScript?

01-15-2003, 05:21 PM

is it possible to write a form in javascript on a web page and then use ADO in the script to save info entered by user into a Ms Access dba table?So for example a user enters his/her name,age,address etc into a textbox clicks a button and the info is written to corresponding fiels in an Access table.

How would one go about doing this?


01-15-2003, 11:42 PM
javascript will work within the scope of your page, but in order for you to insert records into a Access you need to interact with the database that resides on the server. so in answer to your question, you cannot do what you are asking for with javascript alone. you would need a server side language to do that.

01-16-2003, 01:35 AM
If you have ADO available, and Access, then you're apparently using a Microsoft Operating System, so you should be able to use ASP (as stated above, a server-side language) with IIS/PWS to write to the Access database, if it's installed, or you install it on the server which is hosting the webpage.

However you'll probably want to write your ASP code in VBScript (as opposed to JavaScript) because there is MUCH more reference material available for using VBScript server-side than there is with JavaScript. :)

Check out http://www.webmonkey.com and look under "backend" and then "databases", and you should find some really good tutorials on this. :)

You may also want to look at the following links:


P.S. Actually doing something like this is fairly easy once you get down the basics of ASP. If the links above don't help much, I would get a book like "Beginning ASP 3.0" by Wrox.com, and don't be afraid to visit me and my friends in the ASP forum. :)

You also might want to check out my login/registration scripts and/or "contact us" script - probably the latter is a bit easier...



Hope this helps!

01-16-2003, 10:21 AM
thanks for the cool posts and links.

one question: do i need a web server to pull this off?
i guess it isnt as simple as just writing the javascript code and then writing asp to plonk the data into the dbas without a net server.oh..of course where would the asp script read the javascript if not from an IIS server!

is there anyway a person can experiment with server side scripts such as asp or xml without having all the stuff like IIS etc?
and be able to test the scripts and run them?

01-16-2003, 03:47 PM
your "Windows" should come with a personal web server.
that will allow you to test and run LOCALLY your server-side scripts.

01-17-2003, 12:59 AM
Yeah, what OS do you have?

I'm using ME at home, and I installed PWS off the Win98 SE disc since ME doesn't include it... for testing scripts, it works fine (except for CDONTS email). :)