- The added line is THIS COLOR.
- The deleted line is THIS COLOR.
**Index [#ub7cac4e]
#contents
** What is This? [#bfb46c8d]
TkSQLite is a GUI database manager for SQLite implemented by Tcl/Tk.
It can manage SQLite version2.8 and SQLite version3.x database. And it can handle many
encodings like Shift-JIS, EUC-JP and Windows native milti-byte
encodings not only UTF-8. And it can run on Windows and Linux
and MacOSX as native Look & Feel. And it's Freeware.
** Features [#oefefad8]
-Support SQLite2.8 and SQLite3.x db.
-Support many encodings not only utf-8.
-Edit table with grid table.
-Change table schema.
-Show images in BLOB data.(Sqlite3)
-Syntax keyword hilighting.
-Native Look & Feel.
-Japanese and English locale.
-Many functions (md5, sha1, des, etc. see [[SQLite user function]])
-Run on any platform Tcl/Tk can.
-Attach and Detach Database.
-Export and Import CSV.
-Dump a database to SQL.
-Support loadable extension.
**Requirements [#requirements]
-[[Tcl/Tk8.4+:http://www.tcl.tk/]]
-[[Tile0.7+:http://tktable.sourceforge.net/tile/]](not required for Tcl/Tk8.5)
-[[tclsqlite and|or tclsqlite3:http://www.sqlite.org/]]
-[[TkTable2.9+:http://tktable.sourceforge.net/]]
-[[Dict8.5+:http://pascal.scheffers.net/software/]](not required for Tcl/Tk8.5)
-[[Treectrl2.1+:http://sourceforge.net/projects/tktreectrl/]] (if tksqlite is 0.4, it requires Tablelist0.5+ instead of treectrl)
-[[tkImg:http://sourceforge.net/projects/tkimg/]] (required for reading image data. it is optional. if it is not installed, you can read GIF format only.)
-[[Trf:http://sourceforge.net/projects/tcltrf]] and [[Tcllib:http://sourceforge.net/projects/tcllib/]] (required for MD5 , SHA1, DES, Base64 and other crypt functions. but it is optional.)
''NOTE:''~
Tablelist4.5+ is still required by tksqlite 0.4.
But tksqlite 0.5 requires Treectrl2.1+ instead of Tablelist.
[[ActiveTcl:http://www.activestate.com/Products/activetcl/index.mhtml]] has all of these precompiled extensions. I really recommend to install it if you are not familiar with tcl/tk environment.
** Uninstall [#d64566fc]
remove tksqlite.tcl and, rm ~/.tksqlite on linux or %APPDATA%/tksqlite/.tksqlite on windows
** License [#c9005506]
New BSD style license.
**Screenshot [#tef99b25]
//ver0.1 on Win2000~
//http://reddog.s35.xrea.com/img/tkSQLiteGUI001.jpg~
//~
//ver0.2 on Linux~
//http://reddog.s35.xrea.com/img/tkSQLiteGUI002.jpg~
//~
ver0.5 English version on Vista~
#ref(http://reddog.s35.xrea.com/img/TkSQLite001.png,nolink,TkSQLite version 0.5 on Vista)~
~
ver0.4 Japanese version on Linux~
#ref(http://reddog.s35.xrea.com/img/TkSQLite0.3a.png,nolink,TkSQLite version 0.4 on FedoraCore1)~
**Download [#download]
-Old versions~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.3.2.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.1.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.2.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.3.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.4.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.5.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.6.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.3.2.tar.gz~
http://reddog.s35.xrea.com/software/tksqlite-0.4.1.tar.gz~
http://reddog.s35.xrea.com/software/tksqlite-0.4.2.tar.gz~
http://reddog.s35.xrea.com/software/tksqlite-0.4.3.tar.gz~
http://reddog.s35.xrea.com/software/tksqlite-0.4.4.tar.gz~
http://reddog.s35.xrea.com/software/tksqlite-0.4.5.tar.gz~
http://reddog.s35.xrea.com/software/tksqlite-0.4.6.tar.gz~
-ver0.4.7~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.4.7.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.7.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.4.0'')~
http://reddog.s35.xrea.com/software/tksqlite-0.4.7-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.4.7-linux-ix86-bin.tar.gz~
-ver0.5.0~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.0.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.0.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.4.1'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.0-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.0-linux-ix86-bin.tar.gz~
-ver0.5.1~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.1.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.1.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.4.1'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.1-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.1-linux-ix86-bin.tar.gz~
-ver0.5.2~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.2.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.2.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.4.2'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.2-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.2-linux-ix86-bin.tar.gz~
-ver0.5.3~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.3.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.3.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.4.2'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.3-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.3-linux-ix86-bin.tar.gz~
-ver0.5.4~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.4.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.4.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.4.2'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.4-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.4-linux-ix86-bin.tar.gz~
-ver0.5.5~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.5.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.5.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.5.2'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.5-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.5-linux-ix86-bin.tar.gz~
-ver0.5.6~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.6.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.6.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.6.0'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.6-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.6-linux-ix86-bin.tar.gz~
-ver0.5.7~
--Tcl script~
http://reddog.s35.xrea.com/software/tksqlite-0.5.7.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.7.tar.gz~
--Standalone executable binary (sqlite 2.8.17 / ''3.6.5'')~
http://reddog.s35.xrea.com/software/tksqlite-0.5.7-win32-bin.zip~
http://reddog.s35.xrea.com/software/tksqlite-0.5.7-linux-ix86-bin.tar.gz~
#htmlinsert(TkSQLite336x280)
Note: Please take care of compatibility of file format.~
see also ~
http://www.sqlite.org/changes.html~
http://www.sqlite.org/formatchng.html~
** Update History [#changelog]
-''0.1.0'' (2004-01-14)
-''0.2.1'' (2005-11-04)
-- Fix table bug "PRAGMA" result was not shown
-- Fix syntax hilighting bug
-- Fix index property bug
-''0.2.2'' (2005-11-18)
-- Fix syntax hilighting bug
-- Fix selection of attached database bug
-- FIxed bug of grid table's insert row mode.
-''0.2.3'' (2005-11-21)
-- Fix grid table bug that deleting row makes rowid shifts.
-''0.2.4'' (2005-11-26)
-- Fix encoding bug, data was garbled, when euc-jp on sqlite3.
-''0.3'' (2005-12-04)
-- Create Table Dialog, Create Index Dialog and Preference Dialog.
-- Improvement of Look & Feel.
-- Sort Grid Table command.
-- Search Dialog for Grid Table.
-- Add Option of Vi like keybind for Grid Table.
-- Attach/Detach db menu.
-- Import/Export SQL and CSV(or Tab)
-- Add many db functions(regexp, regsub, md5 etc).
-''0.3.1'' (2005-12-14)
-- A Project name was renamed to TkSQLite.
-- Fix a csv import bug that a data having single quote char causes error.
-- Fix a session bug that TkSQLite wasn't able to recover correct window position on Windows.
-- Fix a editor bug that brace char causes a error.
-''0.3.2'' (2006-06-08)
-- Made Standalone binary version.
-- Unified Japanese and English version. Locale is automatically selected now.
-- Fix sqlite init bug.
-''0.4.0'' (2006-08-04)
-- Require dict, Trf, tablelist and tkImg packages.
-- Improvement of Keyword Highlight.
-- Improvement of Preference, CreateTable and CreateIndex Dialogs.
-- Add 3.x compatible format mode option. (in Preference -> SQLite)
-- Add Cache size Dialog.
-- Add DataEditor Dialog.
-- Enable to change table schema.
-- Enable to view images in BLOB data.(gif, jpeg, png, bmp, ico, tiff, tga, ppm (require tkImg))
-- Speed up base64 encode/decode.
-- New user function compress, decompress, read_file and write_file. (see [[SQLite user function]])
-- Add binary mode to crypt user function (md5, sha1, base64_encode, etc). (see [[SQLite user function]])
-''0.4.1'' (2006-08-13)
-- update to sqlite 3.3.7 in executable standalone version
-- Fix a little bug of legacy file format option.
-''(source tcl script isn't modified)'' (2007-01-11)
-- update to sqlite 3.3.10 in executable standalone version
-''(source tcl script isn't modified)'' (2007-01-23)
-- update to sqlite 3.3.11 in executable standalone version
-''(source tcl script isn't modified)'' (2007-01-28)
-- update to sqlite 3.3.12 in executable standalone version
-''0.4.2'' (2007-02-15)
-- Pay attention to utf8/utf16(unicode) byte order mark when importing/exporting text.(thanks to Deneufchatel Renaud)
-- Fix some gui bugs.
-- update to sqlite 3.3.13 in executable standalone version
-''0.4.3'' (2007-03-13)
--Fix typo of Trf package loading.
--Improvement of native look & feel on xpnative, winnative, clam(on unix) theme.
--Readiness for tk8.5a6(or b1?) and tile0.8. tksqlite now works with these last versions. But it is still on the anvil. (thanks to Julian Noble)
--Fix some gui bugs.
-''(source tcl script isn't modified)'' (2007-04-05)
-- update to sqlite 3.3.14 in executable standalone version.
-- A tclkit of linux was compiled with thread-enabled option.
-''(source tcl script isn't modified)'' (2007-04-09)
-- update to sqlite 3.3.15 in executable standalone version.
-''(source tcl script isn't modified)'' (2007-04-23)
-- update to sqlite 3.3.16 in executable standalone version.
-''(source tcl script isn't modified)'' (2007-04-29)
-- update to sqlite 3.3.17 in executable standalone version.
-''0.4.4'' (2007-05-25)
-- Improved a behavior of grid-table. If a new row was created and a column had default value, the value would be set instead of empty string.
-- Fixed some startup errors on Mac OS X.
-- Changed Modifier key to be a Command key on Mac OS X.
-- Fixed right-mouse button behavior on Mac OS X. (thanks to Andre Berger!)
-- Changed Shortcuts. Now "Select All" is Ctrl-A. (or Cmd-A on Mac OS X)
-- Fixed and Improved Look and Feel a little.
-- Fixed a garbled string on japanese locale.
-- Improved fonts.
-- Updated Tcl/Tk version in standalone version to 8.5(CVS HEAD. now it was 8.5a7). And The Linux version was compiled as an enable-xft. So you can see anti-aliased font. If you want a standalone without xft, e-mail me or post a comment in this page.
-''0.4.5'' (2007-05-28)
-- Fixed conflict of context menu bindings and default widgets bindings on Mac OS X.(thanks to Andre Berger!)
-''0.4.6'' (2007-06-20)
-- Fixed garbled string inputted by xim on unix, if encoding isn't utf-8.
-- Added [[cp51932 encoding>cp51932.enc]] to standalone version.
-- Updated to sqlite 3.4.0 in executable standalone version.
-''0.4.7'' (2007-07-04)
-- New message dialog, backport from 0.5.0.
-- Fixed bugs, backport from 0.5.0.~
But garbled string when using multibyte encoding (shiftjis, euc-jp, etc) on sqlite3 is not fixed. If the db has the combination, export it on tksqlite0.4, and import the data to new database on tksqlite0.5. If the db is utf-8 on sqlite3 or sqlite2 db is used, this problem didn't occured.
-''0.5.0'' (2007-07-04)
-- Require tktreectrl2.1+ instead of tablelist.
-- Added CreateTrigger Dialog.
-- Added a new file selection dialog ( http://wiki.tcl.tk/15897 ).
-- Improved widgets L&F on WindowsXP at tile0.8.
-- Improved DataEditor Dialog.
-- Enabled to load loadable extension and user tcl script.
-- Enabled to create UTF-16le, UTF-16be database.
-- New message dialog. I avoided to use ttk::dialog. Because I noticed that the ttk::dialog was removed in Tk8.5a7 CVS HEAD. And this dialog shows a long message in textbox.
-- Used tclkit lite to avoid libstdc++ dependency on linux standalone version. I have a bit of concern about the tclkitlite works fine.
-- Updated Tcl/Tk to CVS HEAD used in standalone version.
-- Fixed garbled string when db is multibyte encoding on sqlite3.
-- Fixed sql parser error if "CREATA TABLE" query has "DEFAULT NULL".
-- Fixed delete row error if using multibyte encoding on sqlite3.
-''(source tcl script isn't modified)'' (2007-07-21)
-- update to sqlite 3.4.1 in executable standalone version.
-''0.5.1'' (2007-08-04)
-- Fixed a little bug building an invalid CREATE TRIGGER query.
-- Fixed a suspicious behavior of a grid table.
-- Improved import/export text dialog. The dialogs can set custom quote and separator.
-- Improved a modify table scheme dialog. When you add a new column to a table and the column has default constraint, the column fillled with the default value.
-- Improved some GUI interface.
-''0.5.2'' (2007-08-14)
--Fixed odd behavior of a grid table.
--Fixed a bug that sql parser could not parse DEFAULT clause which has minus number or quoted string.
--Fixed a but that if "NULL" was enterd in DEFAULT text entry on CreateTable Dialog, the value was not used as string "NULL" but real NULL.
-''(source tcl script isn't modified)'' (2007-08-16)
-- update to sqlite 3.4.2 in executable standalone version.
-''0.5.3'' (2007-09-04)
--Improved gui a little.
--Fixed a conflict between tclsqlite and last Tcl8.5a7 which reformed Var struct.
--Fixed a text sticking out of cell in grid table. The problem was caused on xft-enabled tk8.5 only.
-''0.5.4'' (2007-09-05)
--Fixed a bug that CSV(Text) Importer couldn't break out of the infinite loop, if the text had invalid sequence.
--Fixed a left-over conflict between tclsqlite and last Tcl8.5a7.
--Improved speed of setting data on grid-table.
-''0.5.5'' (2007-10-08)
-- Updated to sqlite 3.5.1 in executable standalone version
-- Updated to Tcl/Tk 8.5b1 in executable standalone version
-- Refactored a little.
-''(source tcl script isn't modified) (2007-10-12)''
-- Fixed a startup error that standalone version for win32 didn't run on WindowsXP.
-''(source tcl script isn't modified) (2007-11-16)''
-- update to sqlite 3.5.2 in executable standalone version.
-''0.5.6'' (2007-12-04)
-- Updated to sqlite 3.5.3 in executable standalone version
-- Updated to Tcl/Tk 8.5b3 in executable standalone version
-- Fixed file selection dialog error that called ttk::dialog.
-- Fixed auto_path error when tksqlite is executed by starkit. (but I didn't test it...)
-''(source tcl script isn't modified) (2007-12-15)''
-- Updated to sqlite 3.5.4 in executable standalone version.
-''(source tcl script isn't modified) (2008-02-02)''
-- Updated to sqlite 3.5.5 in executable standalone version.
-- Updated to Tcl/Tk 8.5.1b1 in executable standalone version.
-''(source tcl script isn't modified) (2008-03-23)''
-- Updated to sqlite 3.5.7 in executable standalone version.
-- Updated to Tcl/Tk 8.5.1 in executable standalone version.
-''(source tcl script isn't modified) (2008-07-17)''
-- Updated to sqlite 3.6.0 in executable standalone version.
-- Updated to Tcl/Tk 8.5.3 in executable standalone version.
-''0.5.7'' (2008-11-17)
-- updated to sqlite 3.6.5 in executable standalone version.
-- Updated to Tcl/Tk 8.5.5 in executable standalone version.
-- Updated to Tktable2.10 in executable standalone version.
-- Updated to Treectrl2.2.8 in executable standalone version.
-- Updated to Tcllib1.11 in executable standalone version.
-- Fixed a bug, if column name was reserved keyword, "Modify Table schema" Dialog failed to change the column name.
-- Fixed init file ".tksqlite" could not save on Windows Vista, TkSQLite 0.5.7 will read/write the file in %APPDATA%/tksqlite directory on Windows. If you have old .tksqlite, copy it to be %APPDATA%/tksqlite/.tksqlite. It still saved in home directory on other platforms.
-- Enable to set DEFAULT value on "Modify Table schema" Dialog to be CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, expr such like (DATETIME(CURRENT_TIMESTAMP, 'localtime')). Notice that CURRENT_* are allowed only the column type is DATE, TIME, DATETIME or TIMESTAMP only. If another column data type is used, the value will be string 'CURRENT_TIMESTAMP'.
-- If SQL Editor has selection, and you push Ctrl-Enter (Shortcut for execution query), then only the selected range will be executed.
** How to use [#pdaa6504]
*** Create Table and Index [#kc6d3e69]
-Create Table~
#ref(http://reddog.s35.xrea.com/img/TkSQLite_createtable.png,nolink,create table dialog)~
~
#ref(http://reddog.s35.xrea.com/img/TkSQLite_createcolumn.png,nolink,create/modify column dialog)~
-Create Index~
#ref(http://reddog.s35.xrea.com/img/TkSQLite_createindex.png,nolink,create index dialog)~
*** Key Binding [#fe49003b]
-Editor
|>|BGCOLOR(#BBBBBB):CENTER:Normal keybind |
|BGCOLOR(#DDDDDD):Ctrl+Return |Execute sql |
|BGCOLOR(#DDDDDD):Ctrl-Delete |Clear all |
-GridTable
--Normal mode
|>|BGCOLOR(#BBBBBB):CENTER:Normal keybind |
|BGCOLOR(#DDDDDD):Ctrl+n |Insert Row |
|BGCOLOR(#DDDDDD):Ctrl+d |Delete Row |
|BGCOLOR(#DDDDDD):F5 |Update Grid Table |
|>|BGCOLOR(#BBBBBB):CENTER:Vi keybind |
|BGCOLOR(#DDDDDD):h |Move left |
|BGCOLOR(#DDDDDD):j |Move down |
|BGCOLOR(#DDDDDD):k |Move up |
|BGCOLOR(#DDDDDD):l |Move right |
|BGCOLOR(#DDDDDD):o |Insert row |
|BGCOLOR(#DDDDDD):slash |Show Search Dialog |
|BGCOLOR(#DDDDDD):gg |Move top |
|BGCOLOR(#DDDDDD):G |Move bottom |
|BGCOLOR(#DDDDDD):u |Update Grid Table |
--Cell Edit mode
|>|BGCOLOR(#BBBBBB):CENTER:Normal keybind |
|BGCOLOR(#DDDDDD):Escape |Cancel Editing |
|BGCOLOR(#DDDDDD):Return |Commit and move down |
|BGCOLOR(#DDDDDD):Shift+Return |Commit and move up |
|BGCOLOR(#DDDDDD):Ctrl+Return |Commit |
|BGCOLOR(#DDDDDD):Alt+Return |Insert Return |
|BGCOLOR(#DDDDDD):Left |Commit and move left |
|BGCOLOR(#DDDDDD):Right |Commit and move right |
|BGCOLOR(#DDDDDD):Tab |Commit and move next |
|BGCOLOR(#DDDDDD):Shift+Tab |Commit and move prev |
|>|BGCOLOR(#BBBBBB):CENTER:Vi keybind |
|BGCOLOR(#DDDDDD):Ctrl+h |Commit and begin editing left |
|BGCOLOR(#DDDDDD):Ctrl+j |Commit and begin editing down |
|BGCOLOR(#DDDDDD):Ctrl+k |Commit and begin editing up |
|BGCOLOR(#DDDDDD):Ctrl+l |Commit and begin editing right |
--Insert new row
|>|BGCOLOR(#BBBBBB):CENTER:Normal keybind |
|BGCOLOR(#DDDDDD):Escape |Cancel |
|BGCOLOR(#DDDDDD):Return |Commit |
|BGCOLOR(#DDDDDD):Shift+Return |Commit and move up |
|BGCOLOR(#DDDDDD):Ctrl+Return |Commit |
|BGCOLOR(#DDDDDD):Alt+Return |Insert |
|BGCOLOR(#DDDDDD):Up |Commit and move up |
|BGCOLOR(#DDDDDD):Down |Commit |
|BGCOLOR(#DDDDDD):Left |move left |
|BGCOLOR(#DDDDDD):Right |move right |
|BGCOLOR(#DDDDDD):Tab |move next |
|BGCOLOR(#DDDDDD):Shift+Tab |move prev |
|>|BGCOLOR(#BBBBBB):CENTER:Vi keybind |
|BGCOLOR(#DDDDDD):Ctrl+h |same as Left |
|BGCOLOR(#DDDDDD):Ctrl+j |same as Down |
|BGCOLOR(#DDDDDD):Ctrl+k |same as Up |
|BGCOLOR(#DDDDDD):Ctrl+l |same as Right |
-DataEditor(Text) (this binding is enable on tksqlite0.5+)
|>|BGCOLOR(#BBBBBB):CENTER:Normal keybind |
|BGCOLOR(#DDDDDD):Ctrl+Return |Update |
|>|BGCOLOR(#BBBBBB):CENTER:Vi keybind |
|BGCOLOR(#DDDDDD):Ctrl-h |Move left grid table cursor |
|BGCOLOR(#DDDDDD):Ctrl-j |Move down grid table cursor |
|BGCOLOR(#DDDDDD):Ctrl-k |Move up grid table cursor |
|BGCOLOR(#DDDDDD):Ctrl-l |Move right grid table cursor |
*** Import/Export CSV [#x4f20879]
-Import CSV Dialog~
#ref(http://reddog.s35.xrea.com/img/TkSQLite_import.png,nolink,import csv text dialog)~
--If "First Line is Field Name" was checked and an existing table didn't have the field,
TkSQLite try to insert empty string or NULL(if the col was integer primary key) to the field.
--Leading spaces adjacent to separator are trimmed.
--Fields with embedded separator must be delimited with quote characters.
--The embedded quote characters must be represented by a pair of quote characters.
-Export CSV Dialog~
#ref(http://reddog.s35.xrea.com/img/TkSQLite_export.png,nolink,export to csv test dialog)~
*** Functions [#a433bd24]
TkSQLite have many user functions emulated some other DB's functions. See [[SQLite user function]].
~
- Some example
--perl5 like regexp. (this is Tcl regexp command. see also [[Syntax of Tcl regular expressions:http://www.tcl.tk/man/tcl8.4/TclCmd/re_syntax.htm]].)
select * from t where name regexp "^J.*"
--regsub(pattern, colname, str). You can use submach pattern like \1 too.
insert into t
select regsub("syo", name, "sho") from t2
~
select regsub("(\d{4})(\d{2})(\d{2}).*", "20050401", "\1-\2-\3")
2005-04-01
--MD5(requires Tcllib).
select md5(name) from t
--read_file
insert into t values(NULL, 'image test', read_file('c:/tmp/001.gif', 1));
*** Loading tcl script functions. [#ye1814e3]
tksqlite 0.5 can load tcl script functions. The interface is tclsqlite.
You can access the ''db'' command. It is just a sqlite database command.
But don't use another sub commands except for ''db function'', because
the command is used by tksqlite. Don't rename and free the command too.
The loading process is
+ db is opened.
+ default sqlite functions is installed.
+ registerd tcl scripts are sourced.
''Example:''
~
plus.tcl
proc plusProc {a b} {
if {[string is double $a] && [string is double $b]} {
return [expr {$a + $b}]
}
return [append a $b]
}
db function plus plusProc
Register this script in Preference Dialog, and check Enable.
Then open a database file and You can use the plus func.
select plus(1,1)
returns 2
select plus(1, 'abc')
returns '1abc'
** One Line Comment [#g986055b]
-this script is useful, but 20mb TCL prerequisite is a killer! is it possible to wrap standalone windows version? -- techie 2006-01-09 22:15:07;
-Thank you. I'll examine that. -- reddog 2006-01-11 15:30:37
-Hi. Looks like a great peace of software but, as techie said, not really usable beacause of TCL. Good idea, wrong method. -- matthieu 2006-03-09 17:19:50
-I was going to make standalone until 3.3 came. But I'm hesitating about it now. -- reddog 2006-03-17 01:58:51
-Excellent work. Would be nice if keywords could be uppercased automatically in addition to colorized. This is SQL, not C. -- mikew 2006-06-22 02:36:29
-Your standalone executable binary for Windows is excellent. I just loaded 785 mgbyte db with no problems. Quick queries too. Thank you. -- robert 2006-06-26 09:50:57
-Thanks for the excellent program, very useful. Keep up the good work. -- rjk 2006-07-01 23:57:27
-Just gets better and better. Domo Arigato for the uppercase SQL keywords and all the other improvements. -- mikew 2006-08-12 02:59:35
-Thank you for the impressive work. Would be really be able to work with in memory db, fully load a db in memory and offloading the results into a new db -- mario 2006-08-30 21:21:21
-Really excellent program - if development remains active I expect it will become the most popular SQLite management software -- amnon 2006-11-18 08:05:11
--I am now observing Tcl/Tk8.5 and some sqlite new features... -- reddog 2006-11-20 22:46:05
-I have to admit, I am not fan of Tk look, but TkSQLite works great and I have the best sqlite-admin experience of all frontends (linux), THANK YOU! -- macias 2007-01-14 06:20:09
-Dear Reddog - would you mind if I make a new page on the Tcler's Wiki for tksqlite ? It is by far the nices manager for SQLite I've seen. Thank you. -- AC 2007-01-29 12:49:48
--No, of course I don't mind that. Please add tksqlite to Tcler's wiki. -- reddog 2007-01-29 21:11:41
-Page added to Tcler's Wiki - http://mini.net/tcl/TkSQLite -- AC 2007-01-30 11:04:16
-Looks very nice and Tcl is just the right choice! The 0.4.2 linux standalone .tar.gz is broken :-( -- koloska 2007-01-31 21:59:44
--There isn't 0.4.2 yet. And I could untar 0.4.1 and 0.3.2. -- reddog 2007-02-01 00:25:55
-Sorry, 0.4.2 was a false mix of 0.3.2 and 0.4.1. Today the 0.4.1 .tar.gz is fine - thank you! -- koloska 2007-02-01 19:26:04
-ver0.4.5のツールバーが日本語にならないのですがパッチを作成しないとだめでしょうか? -- jilslay 2007-06-16 14:36:31
--ツールバーってどの部分のことですか?パッチを作っていただけるならメールで送ってください。あと、OSくらい教えてくれてもいいんじゃないかと思います・・・そこまで隠さなくても -- reddog 2007-06-17 02:40:25
-大変失礼いたしました.申し訳ございません OSはwindows xp proです File,database 等が日本語にならないかと思いまして. -- jilslay 2007-06-18 08:50:33
--環境変数でLANG=jaしてみてください。 -- reddog 2007-06-18 15:01:10
-どうもありがとうございます 日本語になりました -- jilslay 2007-06-20 00:05:10
-TkSQLite is really great. Thank you + greetings from germany -- Rockford 2007-08-23 17:51:28
-Nice Nice progrm however recent versions 4.3+ having problems with text bleed in table editor? -- Igo AtM 2007-08-29 23:05:00
--thank you for the report. Are you using the binary version for linux? Fmm. It seems to me that the cause is tk's xft rendering or tktable's drawing mode... I will check the problem. -- reddog 2007-08-30 16:19:39
-2 Quick 4 Me thanks for your reply and yes I have consistantly used the Linux binary. The problem occures when text is selected it over writes local table cells this persists after selection -- Igo AtM 2007-09-01 06:42:22
-Quick addition Running latest script OK so problem is in the embedded ver thanks -- Igo AtM 2007-09-02 12:31:12
-the greatest admin for sqlite i ever seen! -- tataremka 2007-09-10 15:42:19
-Hi! 0.5.5 windows standalone doeasn't work :( -- 2007-10-09 14:19:41
--oh... It may be side-by-side config info problem. I tested it only w2k and woked fine. I am looking for the solution. -- reddog 2007-10-10 00:09:50
-dont know if my email reached you:)caouse no answer. it was about new feature: populate datatable with some values.it would be halpful with testing app and db to have possibility to fill tables with lots of data :) -- tataremka 2007-10-10 18:51:55
--I noticed your email was in spam dir on gmail. sorry, I read it now. It seems to me that the feature is useful to create test data. -- reddog 2007-10-10 22:22:20
-Hi? i'm only curious you work on populate dialog? :) one idead till now: maybe blobs with given path to file also :):)? -- tataremka 2007-10-23 18:11:31
-If you get the "cannot find kit pre-init script" error, remember to use the full path to execute. -- Paul 2007-10-25 01:22:00
-Hi! please look in email (propably in spam as before) with new feature request:) Thanx! -- tataremka 2007-10-29 15:26:35
-アイコンのデザインがすごく・・・いいです。 -- twister 2007-10-30 22:04:23
-There is a problem to set default using CURRENT_TIMESTAMP or other standard default, it gets stringfied -- Domingo 2007-11-07 18:33:32
-Perhaps use external sqlite.dll so tksqlite.exe needs no up2007-11-15 -- Fred 2007-11-15 15:39:52
-メモリデータベースは対応してないんでしょうか -- clock 2007-11-17 13:12:56
--してないです。 -- reddog 2007-11-18 21:14:46
-please set auto_path in interp creation at line 9496/7 "$interp(3) eval [list set auto_path $::auto_path]". Otherwise sqlite is not found in kit files -- rene 2007-11-28 19:00:01
--Are you talking about tksqlite standalone version? -- reddog 2007-11-28 19:57:32
-hi. i have tested a lot of sqlite-tools. at the end i only use yours. thank you for your good work. -- Frank 2007-11-30 20:47:54
-If I try to open an existing database as new in ver0.5.5 binary for Linux I get: invalid command name "ttk::dialog" -- Dimitrios 2007-12-03 01:33:47
--I fixed it. try 0.5.6. -- reddog 2007-12-04 02:01:46
-Hey man... the same as others... I have tested many sqlite tools and only your remains... keep going and it will stay on top!... thanks. -- netux 2007-12-08 12:53:26
-after upgrading to gutsy gibbon tksqlite stopped working (versions: 0.4.5 and 0.5.6). -- Tzury Bar Yochay 2007-12-10 23:35:25
--What error message did you get ? -- reddog 2007-12-12 00:09:04
-Thank you for that application. But I have a problem: After upgrading to Ubuntu 7.10 tksqlite does not start - without any message (version 0.5.6 linux). -- josch 2007-12-21 03:19:45
--I noticed that the ubuntu7.10's new security layer may break upx compressed app... I'm looking for a solution now. -- reddog 2007-12-22 02:19:59
--''"sudo /etc/init.d/apparmor kill"'' makes tksqlite work. There may be a way to configure the security layer. But I 'm not well versed in the apparmor. -- reddog 2007-12-22 16:09:09
-OK, now it works again. Thanks -- josch 2007-12-23 21:35:10
-I tried "sudo modprobe -r apparmor" to unload apparmor, then tksqlite worked. (Ubuntu 7.10) -- Rockford 2007-12-24 01:30:46
-Changing the folowing code will make a not perfect hack to prevent CURRENT_TIMESTAMP, CURRENT_ to be stringfied. -- Domingo 2007-12-26 21:35:00
if {$hasdefault == 1} {
if {![Util::isNumber $defaultvalue]} {
if {[regexp {current_} [string tolower $defaultvalue]]} {
set defaultvalue "[string map {' ''} $defaultvalue]"
} else {
set defaultvalue "'[string map {' ''} $defaultvalue]'"
}
}
append coldef " DEFAULT $defaultvalue"
}
-i think that virtual tables are wrong handled, eg.: create virtual table test using fts3(col1, col2); try insert on that table, it is working but tksqlite show error. and additional fts3 tables should be as subnodes in mention befor 'test' table -- tataremka 2008-02-06 15:08:20
--What versions of sqlite and tksqlite and fts3 are you using? I noticed that the last fts3 could not load into a db on windows. -- reddog 2008-02-06 22:04:06
-i'm using the latest one version of tksqlite. i'm suggesting only that you should somehow handle tables depended on virtual one, i mean these created automatically (with sufixes like: _content, _segdir and _segments) by sqlite engine, i think they should be as a subnodes of virtual table (because 'drop table' removes, together with virtual table, those depended tables automatically too. Create virtual table, as i mention prev post, and do some inserts, then you'll see that inserts are executed ok but tksqlite raises some error anyway. -- tataremka 2008-02-07 14:55:29
-when im adding in grid a new row then error is: "Invalid SQL query: not an error INSERT INTO 'main'.'poem' ("name","text") VALUES ('aaa','aaa');" . But if i refresh table view then new row is added! I think that after querry on virtual tables some other error codes are, dont know what yet. -- tataremka 2008-02-07 15:01:20
--I confirmed the insert problem now. I'm goin to debug. thank you. And about the second suggestion, these tables are got from sqlite_master, and AFAIK there are no way to know these parent-children relationship. So it seems to me that it is difficult. -- reddog 2008-02-08 00:34:35
-i cannot create table with CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP default values! evenif i do it with sql editor i cannot add row with it! sqlitemanager insert text 'CURRENT_...' or 'NULL' into grid cell! it has to leave it alone to database or parse it to right datetime or null! i have: CREATE TABLE "test" ( "kol1" TEXT DEFAULT CURRENT_TIMESTAMP, "kol2" TEXT, "kol3" TEXT DEFAULT NULL ) when i use create tabel dialog i get!!!: CREATE TABLE "test" ( "kol1" TEXT DEFAULT ("CURRENT_TIMESTAMP"), "kol2" TEXT, "kol3" TEXT DEFAULT ("NULL") ) even if i do create table with sqleditor to right statement, in the grid is insert wrong default values! here is from sqlite.org from CREATE TABLE help (see paragraph about 'default') : http://www.sqlite.org/lang_createtable.html [^] -- 2008-02-14 22:29:38
--I know the problem. I'm thinking how express the data type in GUI. If you know SQL, try "Dump SQL" button or "show only" checkbox. These show a sql that tksqlite will do. You can edit it, and then execute it. -- reddog 2008-02-17 23:43:32
-すばらしいツールです。スタンドアロン版をdebian-etch686,Xubuntu,win2000で試しました。ただ、debian-etch486ではillegal functionで起動できません.tcl8.4をいれてtclソースで起動するとdictエラーなどが出ます。tclのライブラリがどこか教えていただけますか。 -- tkato 2008-02-15 15:54:06
--[[Requirements>#requirements]]を見てください。 -- reddog 2008-02-17 23:43:32
-can u pls help me install 0.5.6 on mac os x leopard... having troubles/didn't have problems on tiger (used wish), thx 4 help -- standa 2008-03-07 03:47:51
--Sorry I can't help you, because I dont have the machine. -- reddog 2008-03-10 22:26:40
-いいツールです。デザインも素敵ですね。win xp pro ですがメニュー以外の日本語が勝手にHG丸ゴシック?になってしまうのですが・・? -- css &new{2008-03-21 00:56:59};
-↑自己解決。個人的に入れたAIKOフォントが使われていましたので削除したら標準のフォントになりました。どういう優先順位で使われるか不明ですが。 -- css &new{2008-03-22 02:19:23};
-I love the application! And the tcl/tk programming is impressive! -- bweiss 2008-04-05 19:36:51
-expected floating-point number but got "0,0151917" decimal separator is "," -- Fred 2008-04-11 20:47:49
-Just trying it out, looks useful. Question, got empty string instead of expected Null for skipped Integer column when using Table Edit/Insert New Row. -- ARG 2008-04-12 04:36:43
-If column name is reserved word eg. "references" then it can't modify table schema, because of "Failed to parse SQL" You should safe column enclose in [ ] in SQL Commands -- v 2008-10-14 15:21:31
-script errors on my Mac PowerBook "can't find package dict" I'm running tclsh & wish 8.4 -- George Jempty &new{2008-12-06 08:27:49};
--TkSQLite requires some extensions. See [[Requirements>#requirements]] -- reddog &new{2008-12-06 12:26:14};
-【バグ報告です】(スタンドアロン版 ver 0.5.7,WindowsXP) データの中でシングルクォーテーション(')を使っている場合、ファイルを閉じたり別のテーブルを表示させたりすると、(')の数が増えてしまいます。例:(')→(''),('')→('''') 一度増えたらもう変化しないようですが…。 -- sutara_lumpur &new{2009-02-26 17:35:16};
--報告ありがとうございます。確認しました。調べて直したいと思います。 -- reddog &new{2009-03-02 23:04:27};
#commente
#htmlinsert(TkSQLite336x280)
----
[[CategoryTclTk]] [[CategorySoft]]
[[CategoryEnglish]]
HTML convert time: 0.145 sec.