Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript limitations

Status
Not open for further replies.

jasek78

Programmer
Nov 5, 2001
298
US
I need to create a Web-Based Training Module. I am looking at doing this in HTML w/ VBScript and/or JavaScript. Can I use just VBScript embedded into an *.html page to open and modify a MS Access database? Or do I need to use ASP or PHP to do this?

Any comments/suggestions are welcome.

Thanks!

jason
 
Hmmm.

Is this something that would be completely standalone?

In other words, would the Access database and the HTML pages be on a local hard drive or network share?

...or do you truly mean Web-based and not simply based on Web technologies ?

If you want to create actual local applications based on DHTML you might want to look at HTML Applications (.HTAs). There is a sample at:


(Scroll way down the page).

These can interact with Access databases that are on the hard drive or a network share just fine. This is a non-Netscape solution though (IE only).


If however you really want to make something people can use via the Web, you have a couple of choices.

There is always the ASP (or similar) route.

There is also at least one technology that lets a client web page get at a database on a web server. I can't recall the name and I believe there are some nasty potential security problems with it that cause most IIS sites to disable the feature. Ah yes, RDS (Remote Data Service). This would be a Microsoft-only solution (doesn't work on Netscape, or on non-IIS servers).

See:



Another Microsoft-only option is the Tabular Data Control, if your data is read-only. TDC offers an ADO interface to delimited text files on the web server.

See:


This ActiveX Control is part of the standard IE installation - if the users have IE, they have TDC. There are some similar tools for working with XML data too.


But in reality, unless you want to get really creative, I'd say your options are HTAs for desktop applications or something like ASP for web-server applications.
 
I need this to be web-based, but I would like to give it as broad a user-base as possible. I don't want to single out IE/MS users. I would prefer it able to be put on a CD and then opened up in a web browser (IE, Netscape, Opera, etc...), or have the option of putting it on a webserver.

Can I do this with VBScript (or JavaScript?), similar to how I would with a VB program, and then include the .VBS file in the .HTML file?

The database would be in the same directory as the HTML and VBS files.
 
Ok. If you want it on a CD or something that helps focus things a bit.

Hmmm... can an Access database stored on read-only media be opened? Not sure about that one. Easily tested though.

If you want to support weird stuff ;-) like Opera and Netscape, VBScript is pretty much out. This leaves you with JavaScript.

Then there are the browser security restrictions that exist. This is the main reason I suggested HTAs instead of HTM/HTMLs - an HTA has all the rights that the user has on the machine, just like an EXE. This makes me worry that you won't be allowed to open a file or database in script.

And of course THIS assumes that generic Javascript even HAS a way to open an Access database or a file. Again, in an IE-based HTA you could just use ADO to get to the database. ADO is available from JScript in IE, but I can't think of anything like it in Netscape (let alone Opera) - and if it DID exist it probably doesn't work in IE.

This might be one for the Javascript Forum.

Anybody else?
 
Well, hopefully I got this one solved (via some major time spent at the local Borders book store...) I'm not too worried about supporting the Opera browser, but IE and Netscape should deal with VBScript just fine, right? I'll find out early next week if my ideals work or not...

wish me luck =^)

jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top