Transfer data from webpage form to database

Pete..... helten0007 at yahoo.com
Tue Nov 23 20:16:14 EST 2004


Hi I got that error debugged but, now there is a new one:
         12 cur.execute('''INSERT INTO persons (persons.name, 
persons.surname, persons.username, persons.password) VALUES %s,%s, %s, %s 
''' %(form['name'].value, form['surname'].value, form['username'].value, 
form['password'].value))

         13

      cur = <pyPgSQL.PgSQL.Cursor instance>, cur.execute = <bound method 
Cursor.execute of <pyPgSQL.PgSQL.Cursor instance>>, form = 
FieldStorage(None, None, [MiniFieldStorage('name...name', 'sa'), 
MiniFieldStorage('password', 'a')]), ].value = [MiniFieldStorage('name', 
's'), MiniFieldStorage('surname', 'd'), MiniFieldStorage('username', 'sa'), 
MiniFieldStorage('password', 'a')]

       /pack/python-2.3.2/lib/python2.3/site-packages/pyPgSQL/PgSQL.py in 
execute(self=<pyPgSQL.PgSQL.Cursor instance>, query='INSERT INTO persons 
(persons.name, persons.surna...ns.username, persons.password) VALUES s,d, 
sa, a ', *parms=())
       3070                 self.conn.__dict__["inTransaction"] = 0

       3071                 self.conn._Connection__closeCursors()

       3072             raise OperationalError, msg

       3073         except InternalError, msg:

       3074             # An internal error occured.  Try to get to a sane 
state.

      global OperationalError = <class libpq.OperationalError>, msg = 
<libpq.OperationalError instance>


OperationalError: ERROR: syntax error at or near "." at character 29
      args = ('ERROR: syntax error at or near "." at character 29\n',)

Cant figure that one out....

Thanks for all help.....





More information about the Python-list mailing list