


#Java sqlite code#
But I keeo receiving an error code 1 saying that my column does not exist. SQLite has had to sacrifice other characteristics that some people find useful, such as high concurrency, fine-grained access control, a rich set of built-in functions, stored procedures, esoteric SQL language features, XML and/or Java extensions, tera- or peta-byte scalability, and so forth.
#Java sqlite how to#
18:18:12 at .run(SourceFile:93)Source here: Ĭode: Error occurred while enabling Apartments v1.0 (Is it up toĪt _(bukkitĪt _(bukkitPlugiĪt .tEnabled(JavaPlugin.java:217)Īt .JavaPluginLoader.enablePlugin(JavaPluginLoaderĪt .enablePlugin(SimplePluginManageĪt .loadPlugin(CraftServer.java:270)Īt .enablePlugins(CraftServer.java:252Īt .i(MinecraftServer.java:298)Īt .d(MinecraftServer.java:277)Īt .a(MinecraftServer.java:227)Īt .init(DedicatedServer.java:140)Īt .run(MinecraftServer.java:378)Īt .run(SourceFile:539)I copied your example methods into my code but it still wont work :/Īny ideas on how to fix this? Thank you in advanceĪt .I'm trying to insert some data into my SQLite database. 18:18:12 at .callEvent(SimplePluginManager.java:459) 18:18:12 at .fireEvent(SimplePluginManager.java:477)

18:18:12 at .callEvent(RegisteredListener.java:62) 18:18:12 at .JavaPluginLoader$1.execute(JavaPluginLoader.java:330) Thanks to Neodork for some example code he posted that I based this code off of.Īnd of course, thanks to all the wonderful people on the Bukkit Forums.Ĭode: 18:18:12 : ResultSet closed Thanks to PatPeter for the awesome SQLite libraries. I hope I helped! It was a pain in the butt to figure out, so I hope I helped some people avoid what I had to spend forever learning how to do.

So make sure you get all the data you need before you close it. You couldn't call another query without first doing result.close(), which means you are no longer able to get data from that query. ResultSet result = sqlite.query("SELECT * FROM table_name WHERE playername='Pew446' ") Just learn some SQL, and have fun! Also remember, if you create a query that returns a ResultSet (SELECT is the only query that returns a ResultSet), you need to make sure you close it before you call another query. }Obviously this is an example table and you can format it any way you'd like. Plugin.getLogger().info("table_name has been created") Sqlite.query("INSERT INTO table_name(playername, registerdate) VALUES('Pew446', '') ") //This is optional. Sqlite.query("CREATE TABLE table_name (id INT PRIMARY KEY, playername VARCHAR(50), registerdate VARCHAR(50)) ")
