codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Connecting to Access Database on the ISP using javascript  Archive Import (mag) at 01:52 on Tuesday, July 29, 2003
 

I am trying to connect to an MS access database which is on the ISP. The connection path I am using is

var dbPath = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("mydatabase.mdb");

This is not working any suggestions???????

  Re: Connecting to Access Database on the ISP using javascript  Troy Wolf at 00:49 on Friday, August 01, 2003
 

Server.MapPath is a method of the ASP "Server" object. You don`t do this in Javascript. Also, you don`t usually open database with JavaScript. This would usually be done server-side using VBScript in an ASP page or VB.Net or C# in an ASP.Net page. I can help you get started with this...the hardest thing for me to learn when I first started ASP and data-driven web pages was HOW IN THE HECK do I open and interact with the database! I understand! You will get there.
Troy Wolf: site expert
Shiny Solutions


  Re: Connecting to Access Database on the ISP using javascript  Archive Import (Ponte) at 20:28 on Friday, August 15, 2003
 

I am with the same problem.
I can not connect MS Access thru Javascript.

Have you already solve the problem or anybody have a solution?

Thank you

  Re: Connecting to Access Database on the ISP using javascript  Troy Wolf at 11:10 on Tuesday, August 19, 2003
 

The original poster did not reply. Are you two trying to use Javascript to create server-side ASP scripts? Or are you trying to access the database using client-side javascript in your HTML page?

If using ASP, why use Javascript? You CAN, but the standard is to use VBScript, and you`ll find lots of code examples for VBScript.

If you mean client-side javascript in the HTML, unless I`m mistaken, this is not possible. You cannot access the database that lives on another computer from script in your client`s browser. You can read and write local files on the client`s computer, but most browsers will by default block this kind of activity for security purposes.
Troy Wolf: site expert
Shiny Solutions


  Re: Connecting to Access Database on the ISP using javascript  Archive Import (Kentium) at 12:06 on Tuesday, August 19, 2003
 

Javascript is executed on the client, but the client isn`t running a database. How would the connection ever be made?

The database is running on the SERVER which means you`ll need to open a connection to it using a SERVER SIDE script- VBScript being a perfect choice.



  Re: Connecting to Access Database on the ISP using javascript  Troy Wolf at 14:15 on Tuesday, August 19, 2003
 

Agreed, Kentium. This is what I`m trying to help these guys understand. Now, technically, you can use Javascript in your ASP code server-side, but why? If you have a server that can process ASP, then you have VBScript available to you, and this is the defacto standard for ASP scripting.

You guys see what Kentium and I are saying? You can`t open your database from the client`s web-browser. You open the database from code on your webserver. Your server-side code process the data and generates an HTML page that is sent to the client`s browser. The browser is never directly accessing the database.
Troy Wolf: site expert
Shiny Solutions


  Re: Connecting to Access Database on the ISP using javascript  Archive Import (mag) at 18:06 on Tuesday, August 19, 2003
 

Thanks guys for your help

I am not using ASP. I was using javascript to read from the database and then generate the html. this works OK on a server & client network, as I can put the drive number in the path, but i cannot do this web.....
I will get around this using XML/XSL

thanks








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: onload event
•  Active Widgets
•  Re: onmouseover change image and text
•  Line Printer Interface
•  import contacts of msn/yahoo
•  Call windows apps from web apps
•  Re: ASP.NET web controls
•  netscape 6 browser problem
•  Re: Print .doc file from the website using System.Diagnostics.Process


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005