Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) 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
  #1 (permalink)  
Old April 30th, 2005, 11:33 AM
Authorized User
Join Date: Sep 2003
Location: islamabad, pk, Pakistan.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zaeem Send a message via Yahoo to zaeem
Default Connection

Hello I really appreciate your help but can you explain that what is “records.mdb” in connstr? if we want to read an excel file than why mdb (Access) fine mentioned here, and where we shall put the excel sheet name? I’ll b thankful to you if you explain me that.
Code is given below

set dbExl = server.createobject("adodb.connection")
    set rsExl = server.createobject("adodb.recordset")

    connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=records.mdb ;Extended Properties=""Excel 8.0;HDR=Yes"""
        dbExl.ConnectionString = connstr

         sheetName = "Exl-sheet"
           strQry = "select * from ["&sheetName&"$]"
         rsExl.Open strQry, dbExl

do while not rsExl.eof

ID = rsExl(0)
FNAME = rsExl(1)
LNAME = rsExl(2)


Zaeem Sherazi
Zaeem Sherazi
  #2 (permalink)  
Old May 1st, 2005, 04:57 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

The Records.mdb is the name of the Access database you want to open.

If you want to read from Excel, look here:


Then follow the links to "ODBC Driver for Excel", "OLE DB Provider for JET" and "Microsoft Excel Driver Programming Considerations"


Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: 1963 by New Order (Track 10 from the album: Substance - Disc 2) What's This?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection prasanta2expert ASP.NET 2.0 Basics 5 November 7th, 2006 06:21 AM
connection ScottSheck BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 June 14th, 2006 05:54 PM
open connection in another connection adityamadisetty SQL Server 2000 1 May 4th, 2006 04:56 AM
Connection Help morpheus Classic ASP Basics 2 February 3rd, 2005 09:09 AM
connection through C kaushikroy C++ Programming 1 January 30th, 2004 07:30 AM

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