Re: [python-win32] unable to read mssql varchar(max)

2010-05-27 Thread Mark Hammond
On 28/05/2010 3:26 AM, Vernon Cole wrote: I can throw together a quick example of the failure if that will help with debugging. It involves a sample SQL data table that must be imported for the test and is not small (several recorded telephone calls as blobs)-- so I will only do it if needed.

Re: [python-win32] Python service hangs in Dispatch when frozen with py2exe

2010-05-27 Thread Mark Hammond
On 25/05/2010 11:27 AM, Don Dwiggins wrote: There's a good hint there. I've got all my imports listed at the top of the file. I do know that, when using the source, the file is read twice -- once from the command line by the usual Python interpreter, and once by PythonService; it must be differen

Re: [python-win32] Help! How to get IHTMLDocument3 dispatch object?

2010-05-27 Thread Xin Zhao
I am not sure I follow you. What I did was: --- >>> wo = pythoncom.New('InternetExplorer.Application') >>> import win32com.client >>> w = win32com.client.Dispatch(wo) >>> w.Navigate

Re: [python-win32] problem with wmi within a service

2010-05-27 Thread Boris Perez Canedo
> [... snip loads of WMI-related stuff ...] > > I'm happy to help you with this, but I'm afraid your formatting has > defeated my email client. I've got a combination of non-standard space > characters, odd line-wraps, and finally code which I don't entirely > understand. > > Would it be

Re: [python-win32] Help! How to get IHTMLDocument3 dispatch object?

2010-05-27 Thread Tim Roberts
Xin Zhao wrote: > I am not sure I follow you. > > What I did was: > > --- > >>> wo = pythoncom.New('InternetExplorer.Application') > >>> import win32com.client > >>> w = win32com.cli

Re: [python-win32] Help! How to get IHTMLDocument3 dispatch object?

2010-05-27 Thread Tim Roberts
Xin Zhao wrote: > Thanks for your kind reply. > > I tried the new iid, doesn't help. :( > > >>> import pythoncom > >>> wo=pythoncom.New('InternetExplorer.Application') > >>> wo.QueryInterface('{3050f485-98b5-11cf-bb82-00aa00bdce0b}') > Traceback (most recent call last): > File "", line 1, in ? >

Re: [python-win32] unable to read mssql varchar(max)

2010-05-27 Thread Vernon Cole
I ran into the same problem using adodbapi. I tracked it down to the COM call which errored out, and decided that maybe it was a Microsoft problem and ignored it, just leaving the application broken on that feature. If pyODBC can do it, then the problem must be in the COM routines in pywin32. I

Re: [python-win32] Please help! How to get the event handler with IE Dom interfaces?

2010-05-27 Thread Tim Roberts
Xin Zhao wrote: > > I am using pywin32 code get all event handlers defined in a HTML page > in IE. I used pythoncom to start IE, then get document, and finally > reached IHTMLElement object. If the html page defines "onclick=xxx", > element.onclick returns the click handler. However, if an event

Re: [python-win32] unable to read mssql varchar(max)

2010-05-27 Thread Preston Landers
varchar(max) columns are like CLOBs, character large objects, and I'm not sure how well that odbc module handles them. I ended up switching to pyODBC which does handle them. Unfortunately it might not be just a drop-in replacement, and pyODBC does have its own issues. But so far it's working pr

[python-win32] unable to read mssql varchar(max)

2010-05-27 Thread John
Hi, When a ms sql server database column was changed to varchar(max), my python code became unable to read that column. no matter the actual value, python sees it as '\x00'. I use sql server 2008, python 2.4, and pywin32-214. it had worked when the column was a fixed size varchar, eg varch