SQL Execute Issues
in
Contributed Library Questions
•
10 months ago
Using the SQL Library, I've been able to query just fine, but haven't been able to perform execute commands. I'm getting the java.sql.SQLException. My code's below, am I missing something here? Thanks for any help!
//setup mysql
import de.bezier.data.sql.*;
MySQL msql;
int wide=800;
int high=600;
void setup()
{
size( wide, high);
// replace --username--, --password-- with your mysql-account
String user = "root";
String pass = "password#";
String database = "meshes";
// connect to database of server "localhost"
//
msql = new MySQL( this, "localhost", database, user, pass );
if ( msql.connect() )
{
println("we are connected");
msql.query( "SELECT COUNT(*) FROM speed_faces" );
msql.next();
msql.query( "SELECT COUNT(*) FROM speed_vertices" );
msql.next();
msql.next();
msql.execute("CREATE TABLE IF NOT EXISTS meshes.paramtest;");
}
}
1