Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2006, 07:09 AM
Registered User
 
Join Date: Dec 2005
Location: Dammam, Eastern Province, Saudi Arabia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kumar_siva
Default Problem accessing Access Database using JavaScript

i am not able to retrive the data from the web server using the below mentioned javascript. I got the web server path by using the asp function Server.MapPath() and i am able to retrive the data using asp. but i have to use javascript so pls help me and tell me where i am wrong..........

function GetDBMake()
    {
        var objCN = new ActiveXObject("ADODB.Connection");
        var objRS = new ActiveXObject("ADODB.Recordset");
        var strRet = "";
        objCN.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Inetpub\mebco.com\mebco.mdb;Persist Security Info=False")
        objRS.open("Select distinct make From Battery_Names", objCN, 0, 1)

        while(!objRS.EOF)
        {
            strRet = strRet + ';' + objRS.Fields("make");
            objRS.MoveNext()
        }

        objRS.close
        objCN.close
        return strRet;
    }

!!! kumar !!!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing data from Database using Javascript shibasish_nandi Javascript How-To 1 July 30th, 2008 01:45 PM
asp.net 2 accessing sql database code problem... minstrel ASP.NET 2.0 Basics 1 August 31st, 2006 11:40 PM
problem Accessing Access Database using JavaScript kumar_siva Javascript How-To 3 February 8th, 2006 01:45 PM





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