You need to call CoInitialize in each thread created.
It gets executed automatically once when pythoncom
is imported the first time.
hth
Roger
___
Python-win32 mailing list
Python-win32@python.org
I would suggest using ADO (Microsoft
Active X Data Objects) for this. Much cleaner (and more flexible) than
trying to use the Access executable.
import win32com.client, string
#Establish the ADO DB Connection
class fields:
def __init__(self, dbpath,
tblName):
self.dbpath
= dbpath
On Fri, 10 Mar 2006 12:48:28 -0500, James Carroll [EMAIL PROTECTED]
wrote:
Cool, I might just do that myself. My My Documents directory is
C:\jimc and I really like it like that.
As long as his ALLUSERSPROFILE is right, then my code should work:
allUsersAppData =
Hello,
I'm having a tough time resizing a control using
the win32gui/win32con etc.extensions.
I can override the onsize method of a control by
doing:
self.HookMessage (self.OnSize,
win32con.WM_SIZE)
Then on the OnSize I can get the size of the
control using GetClientSize()
So far so
dlg = wx.lib.dialogs.MultipleChoiceDialog(self,
Choose the user's profile directory
Migrate settings for a user, subdirs, (200,200))
Whadayathink?
No, that's no better. In many corporate environments, your personal
profile lives on a net share, while the All
Exactly.
Once you set up the iDispatch to point
to the ADODB object library, you can then use the ADO methods and objects.
One advantage of ADO is that it SHOULD
be installed as part of Windows (I think...I have never run into a case
where is wasn't, anyone on the list want to correct me on
But how on eatrh can I set new widths and heights of a control? Do I have
to re-create the control using CreateWindow? Isn't there another way?
MoveWindow is the call you are after.
Mark
___
Python-win32 mailing list
Python-win32@python.org
I'm trying to get at some data in MS Access. This long query updates a
table. I'm wondering if this query is failing. Anyways, when I run
dbpath = os.getcwd() + \\Test (2).mdb
conn = win32com.client.Dispatch(r'ADODB.Connection')
DSN =
On Mon, 13 Mar 2006 15:28:58 -0500, Phill Atwood [EMAIL PROTECTED]
wrote:
Thanks. This seems like a good idea. I noticed also ADOdb for Python.
Would this work do you know? Since I'm doing win/ms access I think I'll
need to use mxodbc but I don't know how to install that on Windows.
In your
Tim,
Thanks. I've downloaded and installed adodb for Python. But I guess I
need to install mxODBC as well. But I'm not quite understanding the
docs I'm reading on how to do this. It seems very complex
Phill
Tim Roberts wrote:
On Mon, 13 Mar 2006 15:28:58 -0500, Phill Atwood [EMAIL
On 14/03/2006 10:04 AM, Phill Atwood wrote:
Tim,
Thanks. I've downloaded and installed adodb for Python. But I guess I
need to install mxODBC as well. But I'm not quite understanding the
docs I'm reading on how to do this. It seems very complex
Phill
Phill,
Sorry, you've lost
Does anybody know of a way to programmatically check if a particular
Windows box has a soundcard installed and configured?
Background:
I'm running a Windows buildbot for Python and the test suite fails on
test_winsound.py because the box doesn't have a sound card setup. (The
Sound Control Panel
Phill Atwood wrote:
Thanks. I've downloaded and installed adodb for Python. But I guess I
need to install mxODBC as well. But I'm not quite understanding the
docs I'm reading on how to do this. It seems very complex
No, you don't need mxODBC, although I'm curious to know what led you
No, you don't need mxODBC, although I'm curious to know what led you
to believe that.
http://phplens.com/lens/adodb/adodb-py-docs.htm#databases
I guess maybe this link was referring to PHP ...
Well, painfully I'm making some progress. And I appreciate your help in
this. I think my
Sorry, you've lost me ... I thought this (installing mxODBC) was as
simple as downloading the two installers (base and commercial)
that match the version of Python that you are using, and running them.
What docs are you reading?
http://phplens.com/lens/adodb/adodb-py-docs.htm#databases
I
Phill Atwood wrote:
Well, painfully I'm making some progress. And I appreciate your help
in this. I think my previous problem was because I was doing
rs.Open(sqlstmt)
instead of:
rs.Open(sqlstmt, conn)
To execute a generic SQL statement, you create an ADODB.Command
object and connect
Trent Mick wrote:
Does anybody know of a way to programmatically check if a particular
Windows box has a soundcard installed and configured?
Background:
I'm running a Windows buildbot for Python and the test suite fails on
test_winsound.py because the box doesn't have a sound card setup.
On 14/03/2006 11:19 AM, Phill Atwood wrote:
Sorry, you've lost me ... I thought this (installing mxODBC) was as
simple as downloading the two installers (base and commercial)
that match the version of Python that you are using, and running them.
What docs are you reading?
while not rs.EOF:
print rs.Fields(FieldName1)
rs.MoveNext()
This isn't working for me either. Same error about
error: (-2147352567, 'Exception occurred.', (0, 'ADODB.Recordset',
'Operation is not allowed when the object is closed.',
Phill Atwood wrote:
while not rs.EOF:
print rs.Fields(FieldName1)
rs.MoveNext()
This isn't working for me either. Same error about
error: (-2147352567, 'Exception occurred.', (0, 'ADODB.Recordset',
'Operation is not allowed when the object is closed.',
20 matches
Mail list logo