Jump to content
UBot Underground

[SELL] SQLite Database Plugin


Recommended Posts

  • Replies 263
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Are you sick of using text files and CSV files to store your data in the most unprofessional way possible ?   Now with SQLite plugin for Ubot , you will be able to store data , update data , delete da

Hi Everyone, I wanted to confirm the same issues with SQLite and NULL values and DOUBLE QUOTES in your literal strings. I wrestled with this for several hours till I had a breakthrough via trial&

Update 1.2   -Added a grid window command   http://content.screencast.com/users/aymen99/folders/Jing/media/ec539139-86a3-4465-afa6-c33278242026/2013-04-06_1906.png   http://content.screencast.com/user

Posted Images

not updates for now , but possibly will add a chart window command soon ! if you guys have suggestions , let me know :)

 

Is the grid editable? It seems so, but the result is not saved...

yea the grid shouldn't be editable , so it won't save even if you edit ,  but i may add this feature to it!

 

 

 

HelloInsomnia, on 14 Sept 2013 - 3:41 PM, said:http://www.ubotstudio.com/forum/public/style_images/master/snapback.png

The grid doens't seem to change size? I change the window size but the grid stays the same size no matter what - it even side scrolls. Is there any way around this?

 

Hi Aymen, I was checking the whole thread and just reminding you again about these cool suggestions above for future updates of this plugin

 

Thanks.

Link to post
Share on other sites

Hi Aymen, I was checking the whole thread and just reminding you again about these cool suggestions above for future updates of this plugin

 

Thanks.

thx i'll check that out!

 

Is there a way to convert table to comma delimited text?

I don't have a function for that right now , but shouldn't be that complicated to do in ubot!

Link to post
Share on other sites

Hi.

 

I'm getting strange results from the error function:

  alert($plugin function("SQLlite.dll""sqlite error"))

 

 

For example I run:

 

   plugin command("SQLlite.dll""SQLite Query"#database"INSERT INTO xxx VALUES (\'id1\',\'{#hallo}\',\'{#welt}\',\'{#eins}\',\'{#zwei}\')")
    alert($plugin function("SQLlite.dll""sqlite error"))

 

which is successfull and adds data to the database.

But the error function tells me strange stuff:

 

table xxx has 5 columns but 4 values were supplied.

 

Which is not true. When I look into the DB with sqliteman, everything is added to the DB correctly.

 

Not sure if the sqlite error function supports the query at all?

 

Would be great if you could look into that.

 

Thanks in advance for your help

Dan

Link to post
Share on other sites

It also looks like to plugin keeps an handle open to all the database files it used. 

I have to close ubot studio before I'm able to delete the files. 

 

Not sure if it's possible, but it would be nice if the plugin would release the file lock when there is no access to the file.

 

Dan

Link to post
Share on other sites
  • 2 weeks later...

Aymen,

 

how good is the plugin in handling concurrent access to the sqlite file? Read / write?

Can I directly read and write the file from a multi threaded bot? 

 

Dan

Link to post
Share on other sites

Aymen,

 

how good is the plugin in handling concurrent access to the sqlite file? Read / write?

Can I directly read and write the file from a multi threaded bot? 

 

Dan

didn't have the chance to try that yet

Link to post
Share on other sites

As far as i know Sqlite is thread safe, I.E it will lock while doing reads/writes (returns a massage database locked) don't think you will see the message within ubot. So you will need to queue your read/writes

Link to post
Share on other sites

As far as i know Sqlite is thread safe, I.E it will lock while doing reads/writes (returns a massage database locked) don't think you will see the message within ubot. So you will need to queue your read/writes

Yes, SQLite itself can handle that stuff normally. But the SQLLite plugin is kind of a middleware between SQLite and ubot. 

So it highly depends on how this is implemented in the plugin and if the plugin takes care of that.

 

But I might have some time during the next days to test it.

 

Dan

Link to post
Share on other sites

I was just looking seems it was updated with version 3.3.1

I'm pretty sure i had to set up a queue for mine, which wasn't that hard the way i muti-thread my bots

Link to post
Share on other sites

Please consider for the future:

 

1. Clear SQL Error value if there is no error. It always contains the previous error, even if last call did run successful.

2. It also looks like to plugin keeps an handle open to all the database files it used. I have to close the bot do be able to delete the files?

 

 

Thanks

Dan

Link to post
Share on other sites

do you think you could add "update" as well as "insert" for the insert table command

 

If you mean adding and updating table rows then you can use sqlite query command!

If thats not what you mean , please explain more!

Link to post
Share on other sites

The "Table to DB" command overwrites the complete database.

I think he would like to see "Add table to DB"

 

So that the table entries are added to the DB instead of overwriting it.

 

Dan

Link to post
Share on other sites

The "Table to DB" command overwrites the complete database.

I think he would like to see "Add table to DB"

 

So that the table entries are added to the DB instead of overwriting it.

 

Dan

 

Oh i see!

i'll check that too

 

regards

Link to post
Share on other sites

The table to db command doesnt overwrite the full table just to clear that up.what I could like is this command to instead have a option to update table instead of just insert.

Link to post
Share on other sites

I got this error when using v2 SQLite Get Data :

 

"Object reference not set to an instance of an object."

 

What is that means and how to fix it?

 

The SQLite Error function sometimes returns strange stuff.

I think it currently doesn't return $nothing if the command executed successfully. 

 

I already reported that to Aymen. But he's currently very busy. Hopefully he can take a look at that soon.

 

So in your case, I would first check if the command was executed correctly?

If you have the right data in your table, or if everything has been send to the DB correctly, just ignore the SQLite Error for now :-)

 

Dan

Link to post
Share on other sites

Issues with Multithreading

 

I'm getting "Database is locked" error.

 

I'm reading from the DB. And then hand over that data to my threads.

I also try to write to the DB from within the threads. As I would to a global list. 

 

@Amen: How does the plugin handle database locks? For read and write operations?

Are there any retries?

 

It would be really nice if the plugin could handle that in a better way. 

At the moment it just returns "database is locked" sometimes when I use $sqlite data reader

with multithreading and continues.

 

Can that behavior be improved somehow?

 

Dan

Link to post
Share on other sites

Dan

 

 

There is a plugin for firefox called SQLite Manager, you can use it to set some pragmas like

'busy time out".

 

http://www.sqlite.org/pragma.html

Also you will need to stagger your threads with random times as to not access the DB at the same time.

 

Set the busy time out pretty high as well this will give plenty of time for threads to finish accessing DB. What is high? depends on how many threads you have going. I would think in terms of minutes. Remember to set that to milliseconds tho.

 

This should reduce DB locks significantly.

 

@Aymen Some if not all Pragma's are not able to change in Ubot like busy time out and foreign keys

 

TC

  • Like 1
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...