Now my questions. Is it possible to access the database direct from my python source code. I installed the Python ADK from Valentina and tried to explore the given examples, but on my both systems I get different errormessages (like you can see in the attached screenshots). I tried a first test with the followig lines wich are based on the examples of VPython.
#!/usr/bin/python3
# Location of the extension (if need)
import sys
sys.path.append('/opt/VPython/')
# Import extension
import valentina
# Init valentina engine (don't need for client/server)
# valentina.init('VPTN-M-*', 'VPTN-W-*', 'VPTN-L-*')
print("test")
# Remote server without database
try:
#conn = valentina.connect('sa:sa@192.168.178.84/block_000000_200000')
conn = valentina.connect('sa:sa@127.0.0.1/block_000000_200000')
print("test2")
# Execute query
cursor = conn.cursor()
cursor.execute('SELECT count(*) FROM "block"')
# check some cursor properties:
print( "selected records count is:", cursor.rowcount )
for row in cursor:
print("Anzahl: " + str(row[0]))
cursor.close()
conn.close()
except Exception as e:
print("Error-Msg. System: "+str(e))
Can somebody help me with this Problem? What I'm doing wrong?
Thanks a lot
Fabian