Denton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
Hi all:
I working in MS window environment. Now I want to use a python
script to import some data from CSV file to MDB file.
but I have some problems about creating MDB file in DAO.
I am using attached code , but the last line seems invalid.
Does anyone could help me. Thanks!
import win32com.client
eng=win32com.client.Dispatch(DAO.DBEngine.36)
eng.CreateDatabase(d:\\temp.mdb)
Regards
Denton
It's helpful if you post the traceback. I get
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.DbEngine', 'Invalid
argument.', 'jeterr40.chm', 5003001, -2146825287),
None)
Apparently the Locale parameter is required.
eng=win32com.client.gencache.EnsureDispatch(DAO.DBEngine.36)
eng.CreateDatabase(d:\\temp.mdb, win32com.client.constants.dbLangGeneral)
hth
Roger
== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
= East and West-Coast Server Farms - Total Privacy via Encryption =
--
http://mail.python.org/mailman/listinfo/python-list