Re: ado and connection string

From: Tom Alter (Lord2702_at_MSN.com)
Date: 03/23/05


Date: Tue, 22 Mar 2005 17:42:19 -0800

Use one of these: %s is your Access Database file name

// OLE DB Driver string for MS Access database
"Data Source=\"%s\";Provider=\"Microsoft.Jet.OLEDB.4.0\";"
    "Jet OLEDB:Engine Type=5;"

// ODBC
  // Microsoft Access Driver. Version: 9.0
  // e.g.
  // SELECT * FROM <SquareBracket>table name<SquareBracket>
  // Table name should be inside the squarebrackets, spaces
  // dash allowed.
"Driver={{Microsoft Access Driver (*.mdb)}}; "
    "MaxBufferSize=2048; DriverId=25; DBQ=%s; "

"Giupin" <peppepin@libero.it> wrote in message
news:hP20e.687537$b5.31159318@news3.tin.it...
> I've created a web page in ASP using vbscript with ado objects,
> I'm testing it in a pc with Xp Pro and IIS 5.1,
> I've not setted a Data Source Name in "ODBC data administrator"
> The DB is an MsAccess file.
>
> When i try to open the db appear this message:
> "[Microsoft OLE DB Provider for ODBC Drivers]"
> "[Microsoft] [Driver Manager ODBC]"
> "data origin name not found and predefined driver non specified."
>
>
> this is the connection string:
> "Provider=MSADSQL; DRIVER=Microsoft Access Driver (*.mdb);" &_
> "SERVER=localhost; DATABASE=C:\mydb.mdb;"
>
> it is correct? thanks.
>
>



Relevant Pages

  • Re: Pivot Table Datasource
    ... Access database file. ... The SQL CommandText string will have embedded in the FROM clause the ... You will need to reference your PivotCache appropriately. ...
    (microsoft.public.excel.programming)
  • Re: updating a access Database Record
    ... Yes, It is an ASP.NET application, so my access database file can't be ... need to provide full file access to the folder where the Access database is located for the ASPNET ... and it is a somewhat restricted account. ...
    (microsoft.public.dotnet.languages.vb)
  • MS Access ODBC link to another Access database outside of my netwo
    ... I believe I've seen a method for linking to another Access database using ... domain and port (not browsing on the network) on the Access driver ... configuration. ...
    (microsoft.public.access.externaldata)
  • Re: updating a access Database Record
    ... > Yes, It is an ASP.NET application, so my access database file can't be ... When you write to an access database that user has to create an ldb file in ... the same folder as the mdb and be able to write the user locks away to that. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: how do I open a access file .mdb on Word 2003?
    ... I know you can use an Access database it as a data source in Word 2003 ... MVP FAQ site: http://mvps.org/ ... > An .mdb file is an Access database file. ...
    (microsoft.public.word.newusers)