From: Andy T. <an...@ha...> - 2005-07-26 23:25:43
|
Martinez, Miguel (Amermex) wrote: > I=92m trying to show a db cursor in a wxgrid and I don=92t know how, I = tried=20 > to set a cursor.fetchall() and I get this error. >=20 > =20 >=20 > SetTable >=20 > return _grid.Grid_SetTable(*args, **kwargs) >=20 > TypeError: argument number 2: a 'wxGridTableBase *' is expected,=20 > 'list([(=91column one, row one=92, 'column two, row one'), (=91column o= ne, row=20 > two=92, 'column two, row two')] >=20 > )' is received. >=20 > =20 >=20 > How can I show a list, tuple, cursor or resultset in a grid? >=20 First, it's more useful if you post a small sample of your code that=20 triggers the error message, that way people on this list can be a little=20 more helpful and responsive. Secondly, if you want to display the contents of a database table in a=20 grid look at the dbBrowser2 sample application (in the samples/dbBrowser=20 folder of your PythonCard installation). This does pretty much what you=20 have described. Regards, Andy --=20 -------------------------------------------------------------------------= ------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |