forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


sqlite 3 database dsu

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units
View previous topic :: View next topic  
Author Message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri May 20, 2005 6:07 pm    Post subject: sqlite 3 database dsu Reply with quote

Sqlite 3 is a free database system which does not need a server, all tables and databases you create are stored on disc. For many times I have tried to use the DLL version of the sqlite database, but without any luck. That is why I decided to use the EXE version and to create a small DSU for it. You can download the file uploaded with this post to try it out yourself.

For more information about SQL queries, please look at the website below:

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

Code:
 
Commands included:

- sqlite3 execute, <database name>, <sql query>
- sqlite3 clean, <database name>
- sqlite3 remove, <database name>

- sqlite3 fieldsep, <new fieldseperator>
- sqlite3 templist, <list number>
- sqlite3 timeout, <time in seconds>

Functions included:

- @sqlite3(count, <database name>)
- @sqlite3(item, <database name>, <row number>, <column name>)
- @sqlite3(escape, <text>)
 


Please note that the temp list which is used by the unit can NOT be used by other code anywhere in your script, because it keeps a copy of the text return by the last SELECT SQL query to avoid having to open and load the sqlite EXE file unnecessary.



sqlite3.zip
 Description:
sqlite 3 VDS unit

Download
 Filename:  sqlite3.zip
 Filesize:  140.42 KB
 Downloaded:  766 Time(s)


_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!


Last edited by Skit3000 on Sat May 21, 2005 3:33 pm; edited 5 times in total
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri May 20, 2005 7:26 pm    Post subject: Reply with quote

Btw. there might still be some bugs in it. If you find any, please list them in this threath... Smile

When doing @sqlite3(count, tablename) on a non-existing table, you will get -1 as a reply insteed of 0. I will fix this after some more bugs are found... Smile

FIXED: This bug is fixed together with adding a option which sets the "hidden" and "readonly" attributes to the temporary files. The new version is uploaded at the post above.

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat May 21, 2005 10:32 am    Post subject: Reply with quote

Added some code to show a warning when you have errors in your SQL syntax. Please note that if you want to put a single quote into a query, you just have to place two after each other. I will look and see if I can create a function which escapes all characters which aren't allowed to be used with SQL... Smile

FIXED: You can now use @sqlite3(escape, <text>) to escape characters which you aren't allow to use (as for as I know about now).

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group