0

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";
  query.execute([latitud,longitud,"facultad"]).then((result){
    querySelector("#err3").text=result.insertId;
  });
});

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

jdphenix
  • 15,022
  • 3
  • 41
  • 74
dasavi
  • 25
  • 4

1 Answers1

0

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).

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567