Skip to content

Instantly share code, notes, and snippets.

@bonyiii
Created February 4, 2010 16:27
Show Gist options
  • Save bonyiii/294834 to your computer and use it in GitHub Desktop.
Save bonyiii/294834 to your computer and use it in GitHub Desktop.
If one wants to call MSSQL statements like this
declare @aha as varchar(4000);
set @aha='SELECT * FROM pubs.dbo.titles;';
exec(@aha)
One have to use prepare/execute combo:
statement = dbconn.prepare( sql )
results = statement.execute # vagy statement.run
Point is to prepare before execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment