i cant connect db with sqljocky


i have some problems about sqljocky/dart

var pool = new ConnectionPool(host: 'example.com', port: 3306, user: 'hvuo',
                    password: 'xxx', db: 'xxx', max: 1);
querySelector("#err1").text="Conexxon abierta";
pool.prepare("insert into ovnis (latitud,longitud,calle) values (?,?,?)").then((query){
  querySelector("#err2").text="todo casi preparado";

I have this dart code to register a simple database, but this dont insert .
what’s worng?


SqlJocky doesn’t run in the browser, only on the server.

querySelector is client code therefore I assume you try to run in in the browser.
You should have got an error message telling you that dart:io can’t be used on the client (or similar).

Answered By – Günter Zöchbauer

Answer Checked By – Jay B. (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *