Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error: -2147467259 [Microsoft][ODBC Driver Manager] Data source name too long

3,249 views
Skip to first unread message

Tyler Erickson

unread,
Jun 4, 2003, 5:12:23 PM6/4/03
to
I am trying to open an access database and my code is crashing at the
very beginning when I try to open the DB with the following code.

cnn.Open "C:\Documents and Settings\tyler\short.mdb;"

the error message I'm getting is

Error: -2147467259 [Microsoft][ODBC Driver Manager] Data source name
too long

I've shortened the path name as much as I could, or is there another
problem that I am totally missing? (most likely)

Any ideas would be very helpful.
Tyler

Dennis E. Hassell

unread,
Jun 6, 2003, 1:16:21 AM6/6/03
to
Just an idea - it's the ODBC driver on the PC that resolves this path,
and if the driver is more DOS than Windows, it might need an 8.3
character name format like C:\Docum~1\tyler\short.mdb. It may not be
able to parse the longer name.

Dennis Hassell
(941) 746-4919


-----Original Message-----
From: Tyler Erickson [mailto:eric...@BYU.NET]
Sent: Wednesday, June 04, 2003 5:17 PM
To: HP30...@RAVEN.UTC.EDU
Subject: [HP3000-L] Error: -2147467259 [Microsoft][ODBC Driver Manager]
Data source name too long

I am trying to open an access database and my code is crashing at the
very beginning when I try to open the DB with the following code.

cnn.Open "C:\Documents and Settings\tyler\short.mdb;"

the error message I'm getting is

Error: -2147467259 [Microsoft][ODBC Driver Manager] Data source name
too long

I've shortened the path name as much as I could, or is there another
problem that I am totally missing? (most likely)

Any ideas would be very helpful.
Tyler

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

Vanessa Moss

unread,
Jun 6, 2003, 5:27:13 AM6/6/03
to
What are the other connection settings you are using?

One way to open a connection is to use a System or User DSN. When you set
this up on the PC you specify the provider, database path, user ID and
password. Then when you open the connection object you just specify the DSN.
I would guess that the error you are getting is caused because the
connection object is expecting a DSN name because you haven't specified any
other parameters. The path to your database is too long for a DSN name.

Another way is to specify all the parameters when you open the connection,
for instance:

cnn.Open Driver={Microsoft Access Drive(*.mdb)};DBQ="c:\Documents and
Settings\tyler\short.mdb";User ID=;Password=;

HTH

Vanessa

"Dennis E. Hassell" <dhu...@DHACORP.COM> wrote in message
news:906dnQAwnJM...@fidnet.com...


> Just an idea - it's the ODBC driver on the PC that resolves this path,
> and if the driver is more DOS than Windows, it might need an 8.3
> character name format like C:\Docum~1\tyler\short.mdb. It may not be
> able to parse the longer name.
>
> Dennis Hassell
> (941) 746-4919
>
>
> -----Original Message-----
> From: Tyler Erickson [mailto:eric...@BYU.NET]

>

Peter Chong

unread,
Jun 6, 2003, 10:32:58 AM6/6/03
to
Hi, Tyler (OT, But ex-hp3k for 3 decades)

Here is a trick
above win2000 OS

make a blank text file save as "anyfile.udl"
(UDL mean Universal Data Link)

click this file from File explorer
make a connection and test connection from properties menu

copy text file connection strings to your program
When you have an ODBC you could use soeme of free tool from
www.exmlsoft.com

Any one interest in an ASP script that connect to Oracle and extract
data into Excel or HTML within few clicks, please e-mail to me.

eric...@byu.net (Tyler Erickson) wrote in message news:<ab90d4bb.03060...@posting.google.com>...

0 new messages