Re: [python-win32] driving MS Access from python

2006-03-13 Thread Tim Roberts
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.

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Phill Atwood
> 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.', 'C:\\WINDOWS\\HELP\\ADO27

Re: [python-win32] driving MS Access from python

2006-03-13 Thread John Machin
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?

[python-win32] Re: [Python-Dev] Still looking for volunteer to

2006-03-13 Thread Roger Upole
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 setu

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Tim Roberts
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 a

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Phill Atwood
> > 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#da

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Phill Atwood
> 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 prev

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Tim Roberts
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 y

[python-win32] Fwd: Re: [Python-Dev] Still looking for volunteer to run Windows buildbot

2006-03-13 Thread Trent Mick
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

Re: [python-win32] driving MS Access from python

2006-03-13 Thread John Machin
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'

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Phill Atwood
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 P

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Tim Roberts
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. > >I

Re: [python-win32] MS Access query error

2006-03-13 Thread Robert Brewer
Phill Atwood wrote: > intypes.com_error: (-2147352567, 'Exception occurred.', (0, > 'ADODB.Recordset', 'Operation is not allowed when the object is > closed.', 'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240653, > -2146824584), None) IIRC, you need to set Cursorlocation before calling Recordcount. Google

Re: [python-win32] MS Access query error

2006-03-13 Thread Phill Atwood
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 = 'PROVIDER=Microsoft.Jet.OLEDB.4.

Re: [python-win32] Resize a control? How?

2006-03-13 Thread Mark Hammond
> 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 http:/

Re: [python-win32] driving MS Access from python

2006-03-13 Thread eric . powell
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 this

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Phill Atwood
Eric, 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 example below it is not clear (to me) how to get the dimensions of

Re: [python-win32] application data

2006-03-13 Thread James Carroll
> >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,

[python-win32] Resize a control? How?

2006-03-13 Thread Michiel Vleugel
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 fa

Re: [python-win32] application data

2006-03-13 Thread Tim Roberts
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 = os.environ[

Re: [python-win32] driving MS Access from python

2006-03-13 Thread eric . powell
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  

Re: [python-win32] driving MS Access from python

2006-03-13 Thread Tim Golden
[Phill Atwood] | | Need to programatically reproduce some activities a user does | in MS Access. | Need to open a mdb file. Run some queries. Look at some tables. [...] | I having a hard time scaring up appropriate docs on | the MS Access win32com API for this. I've been | looking for VBA

[python-win32] driving MS Access from python

2006-03-13 Thread Phill Atwood
Need to programatically reproduce some activities a user does in MS Access. Need to open a mdb file. Run some queries. Look at some tables. So far import win32com.client a = win32com.client.Dispatch("Access.Application") a.Visible = 1 db = a.OpenCurrentDatabase(filename) Which seems to work

[python-win32] CoInitialize not called?

2006-03-13 Thread Roger Upole
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 http://mail.python.org/mailman/listinfo/p