Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: Re: ODBC - Access files


From   "Sherriff, Martyn" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: Re: ODBC - Access files
Date   Tue, 28 Jul 2009 14:10:09 +0100

Thanks for that. I should have specified that I am using the Office 2007 format. However I will revert to the mdb format and see what happens.
Martyn

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tharyan, Rajesh
Sent: 28 July 2009 13:56
To: [email protected]
Subject: st: RE: Re: ODBC - Access files

Hi,

Why is the exetention of your filename .accdb? Shouldn't it be .mdb 

the following command works for me with a test access dataset called db1.mdb abd table 1.
odbc load, dsn("MS Access Database;DBQ=C:\db1.mdb") table("table1") 

I use stata 10.1 though.

Hope this helps
Rajesh

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Sherriff, Martyn
Sent: 28 July 2009 13:10
To: '[email protected]'
Subject: st: Re: ODBC - Access files

I am able to read Access files via ODBC if I set the dsn up via the control panel, but as I have a large number of files I would prefer to do it directly from the command line (based on www.ats.ucla.edu/stat/Stata/faq.odbc.htm):

odbc load, dsn("MS Access Database;DBQ="c:\Students\David B\rafeala.accdb"") table("t11")

but this fails with the error message "option dsn() incorrectly specified".

Have I made a syntax error or do I have to use the control panel with Access? I have no trouble reading Excel files from the command line.

I am using Vista/ Stata 11.

Thanks,
Martyn


e-mail: [email protected]
Tel. +44(0)-2071-881822
Fax. +44(0)-2071-881823
Departmental Home Page: http://preview.tinyurl.com/2utscj 
Community of Science Profile: http://tinyurl.com/66zr6
Fullers Rugby: www.fullerians.co.uk 
"The difference between winners and losers is that winners tell the jokes and the losers talk about the run of the ball."
"It's not over until the fat man whistles."

P Save paper-Do you really need to print this email?

This e-mail and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful. 






*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index