Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import fdb
- import os
- ruta = 'localhost:C:/Users/Beto/Documents/Proyectos python/Ruby/sama.fdb'
- try:
- con = fdb.connect(
- dsn = ruta,
- user = 'sysdba',
- password = '*******',
- charset = 'utf-8'
- )
- print('Conectado !!')
- except:
- print('Fallo la conexion', ruta)
- cx = con.cursor()
- sql = 'SELECT * FROM user'
- cx.execute(sql)
- filas = cx.fetchall()
- print(filas)
- con.commit()
- con.close()
- Traceback (most recent call last):
- File "C:UsersBetoDocumentsProyectos pythonRubyfire.py", line 22, in <module>
- cx.execute(sql)
- File "C:UsersBetoAppDataLocalProgramsPythonPython35libsite-packagesfdbfbcore.py", line 3573, in execute
- self._ps = PreparedStatement(operation, self, True)
- File "C:UsersBetoAppDataLocalProgramsPythonPython35libsite-packagesfdbfbcore.py", line 2182, in __init__
- "Error while preparing SQL statement:")
- fdb.fbcore.DatabaseError: ('Error while preparing SQL statement:n- SQLCODE: -104n- Dynamic SQL Errorn- SQL error code = -104n- Token unknown - line 1, column 15n- user', -104, 335544569)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement