[Tutor] ODBC SQL Server Question
Jeff Johnson
jeff at dcsoftware.com
Fri Sep 18 17:49:24 CEST 2009
Kristina:
I would format it as follows:
self.cursor.execute("SELECT CUSTID FROM Stories WHERE NAME = '%s'" % name)
Kristina Ambert wrote:
> Hi,
> Is anyone familiar with this error:
> dbi.internal-error: [Microsoft][SQL Server Driver]Invalid cursor state
> in EXEC
> This error is triggered by the first sql statement call in an accessor
> module which purpose is only to get data from a source module and feed
> it into a database:
>
> self.cursor.execute("SELECT CUSTID FROM Stories WHERE NAME= ?", (name))
> I can't figure out what's causing it. I searched for the invalid cursor
> state error online but most of it occurs on the fetchall statement not
> the execute statement.
>
> Any ideas?
> Thanks!
>
>
> --
> Cheers,
> Krissy
> -----------------------------------------------------------------------
> Testing the waters is always fun...
--
Jeff
Jeff Johnson
jeff at dcsoftware.com
Phoenix Python User Group - sunpiggies at googlegroups.com
More information about the Tutor
mailing list