How to get an (db)exception's string

Thomas Gagne tgagne at ix.netcom.com
Wed Dec 20 22:42:51 EST 2000


New question.

The variable I'm getting back appears to be a dictionary:

[{'server': '', 'msgnumber': 2812, 'proc': '', 'line': 3, 'text': "Stored
procedure 'xp_efloat_add' not found. Specify owner.objectname or use sp_help
to check whether the object exists (sp_help may produce lots of output).\012",
'severity': 16, 'sqlstate': 'ZZZZZ', 'state': 5}]

I need to capture the text above in a string so I can transmit it to a client
application.  The exception variable itself is not a string, but it knows how
to print itself.  How can I capture that string so I can send it?

--
.tom






More information about the Python-list mailing list