Jump to content
UBot Underground

I Need Sqlite Help


Recommended Posts

Can someone tell me how to set up an SQLite database?

I have the paid plugin

I create the database “ I can see the file”

The next command is add table to database .

Nothing happened , the file size is 0.

What steps am I missing?

Link to post
Share on other sites

I highly recommend you download and use this to help you with building queries and tables - you can build a table in there and just copy the code like I did then you can test your queries or execute them in there and copy them out: 

 

https://sqlitebrowser.org/

 

Here's an example:

set(#db,"{$special folder("Desktop")}\\testdb.sqlite","Global")
plugin command("SQLlite.dll", "SQLite Create Database", #db)
plugin command("SQLlite.dll", "SQLite Query", #db, "CREATE TABLE `People` (
	`id`	INTEGER PRIMARY KEY AUTOINCREMENT,
	`Name`	TEXT,
	`Age`	INTEGER
);")
plugin command("SQLlite.dll", "SQLite Query", #db, "insert into People (\'Name\', \'Age\') values (\'Jane\', 20)")
alert($plugin function("SQLlite.dll", "$sqlite data reader", #db, "select Age from People where Name=\'Jane\'"))
  • Like 1
Link to post
Share on other sites

thanks nick, i didn't realize i actually had to build columns and headers

 

The other option is you create the db and table in the DB Browser program and then just call the from Ubot. This is fine if you use it yourself but if you plan to distribute the program I always do a check for the DB and if it doesn't exist I create it from Ubot and that means making the tables in Ubot as well. But I always build my tables originally in the DB Browser and keep a separate copy of the db for testing in DB Browser to make sure all my queries work.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...