a newbie question about gadfly
jm7potter at hotmail.com
jm7potter at hotmail.com
Tue Jun 12 11:13:08 EDT 2001
Hello one and all,
I seem to be at a loss as to why the following code fails:
-----
import gadfly
connection = gadfly.gadfly("jnso", "..\\gadfly\\dbtest")
cursor = connection.cursor()
cursor.execute("select * from students")
cursor.execute("insert into students (name, grade) values ('pat','grade 3')")
namex = 'donna'
gradex = 'grade 2'
cursor.execute("insert into students (name, grade) values (namex, gradex)")
connection.commit()
----
The first cursor.execute works fine since I use values ('pat','grade 3')") ---
BUT,
the second fails since I use values (namex, gradex)") ---
Why? is namex not a direct replacement for "donna" ????
Any thoughts would be greatly appreciated.
Regards, Joe
More information about the Python-list
mailing list