javascript thread: Connection to Access database with Javascript, is it possible?
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C071B7.ACAAC340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
This mithg do it. Thank You all for your help and have a happy New Year.
Harry
-----Original Message-----
From: Desmond R. Johnson [mailto:desmond@m...]
Sent: Friday, December 29, 2000 8:25 AM
To: javascript
Subject: [javascript] Re: Connection to Access database with- Javascript,
is it possible?
JScript Version 5.0 is available at
http://msdn.microsoft.com/scripting/jscript/default.htm if your server does
not have IE 5.0 installed. The basic setup is to access the database through
DSN or DSN-less connectors such as
<%@ Language="JScript"%>
var aConnString
"Provider="your-database-connector";Password="your-database-password ";User
ID="your-database-useriduserid";Initial Catalog="your-database-name";Data
Source= "your-server-name";
var rs;
rs = Server.CreateObject ("ADODB.Recordset");
rs.Open("whatever", aConnString);
<html>
<head>
<Script Language="JavaScript">
</Script>
</head>.
I have used this on IIS using ASP. I don't know about other platforms.
Desmond
----- Original Message -----
From: Bill Gunnell
To: javascript
Sent: Friday, December 29, 2000 8:02 AM
Subject: [javascript] Re: Connection to Access database with-
Javascript, is it possible?
I've never used server side javascript either, we use Cold Fusion to
access our databases, I know Four is limited to what he can and can't use.
In a later email I suggested Java with a JDBC connection. Do you know if
JDK 2.0 has the database support in it? I haven't looked at it since 2.0
was released.
Bill
>>> danielw@w... Friday, December 29, 2000 7:54:34 AM >>>
You're assuming the Javascript is being run client-side, however, Bill.
Microsoft's IIS webserver certainly supports the parsing of Javascript,
and (although 've never used them) I'd be surprised if the
cross-platform
versions of ASP, such as Redhat's and Chilisoft's don't.
Within ASP, ADO calls are all very standard: their native to the host
environment (in fact, their native to ADO, of course - but it's the ASP
that makes getting at them so easy). The script you wrap this up in is
very much a matter of taste - between those that like the pedanic "If..
then... Else... Do this... Okay, that didn't work, try this" nature of
VBScript, and those that are happy nesting stuff in {{{'s and }}}'s.
Daniel Walker
Wrox Press
> Four,
>
> I have never seen this done before. I do not believe we can use
Javascript
> to communicate with a database, since most databases are on servers
and
> Javascript does not like to talk to any other machines except the one
it
> is running on. CGI or Java might be a good candidate to store in a
> database.
>
> My book (The Book of Javascript by Dave Thau) states that handling
> aggregating information from users or communicating with other
machines
> are the two weaknesses of Javascript.
>
> Bill
>
>
>
> >>> four_wheeling@w... Thursday, December 28, 2000 9:40:33
PM
> >>>
> I have thumbed through all the books in the book store and can not
find
> any indepth explanation or examples on how to connect to a database
using
> Javascript. Although, many mention connectivity to databases using
> Javascript they go indepth using VBScript. My company does not allow
> VBScript. Basically I have a web page using text boxes. These text
boxes
> have to be filled with the cafeteria's menu items. I need a data entry
> screen for the cafeteria to fill the database. The first screen
mentiioned
> will then have its text boxes filled by the data base for everyones
view.
> Is this possible? Do I have to use ASP? Why the lack of information on
> this topic if it is possible? This seems to me to be a very important
> programming, web page feature.
>
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to javascript as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-javascript-$subst('Recip.MemberIDChar')@p2p.wrox.com