Tadpole - for SQLite

[quote=338232:@Richard Duke]Dave,
a quick question. why is the amount for item over million show as 4.500000e+6??
[/quote]
Norman, Thanks for fixing the Image

It seems that of the various other managers I’ve looked at … only ONE of them showed these values “correctly”… so more experimentation is required on my part… as I wish Tadpole to be more correct than everyone else :slight_smile:

Did you know you tblStock has several “” fields (ie. BLANK ,not NULL) for ActualSaleprice?

I think the issue is DOUBLE datatype (the field is defined as “REAL”, which is mapped to DOUBLE internally)

dim x as double=4500000
msgbox str(x) // also shows 4.500000e+6

No problem it had extraneous spaces
originally it was

[img] http://i.imgur.com/NE12pW8.jpg[/img] 

and that one space between [img] and http matters
go figure

[quote=338232:@Richard Duke]Dave,
a quick question. why is the amount for item over million show as 4.500000e+6??
[/quote]
in the next Release, Tadpole will show Double[Real] values much much better than it does now, thanks for pointing that out

Windows build on Windows 10

I ran a sql statement since the delete row still is not working in windows (no error raised).
The sql completed with Operation Suceeded but does not tell me how many rows were affected.
it also did not reload the remaining items in the table. Screen grayed out – as seen in image.

Screen shot

[quote=338299:@Robert Kantor]Windows build on Windows 10

I ran a sql statement since the delete row still is not working in windows (no error raised).
The sql completed with Operation Suceeded but does not tell me how many rows were affected.
it also did not reload the remaining items in the table. Screen grayed out – as seen in image.

Screen shot
[/quote]
as of right now… that is exactly how is is designed to react… the “gray” area is just an “empty” table…
the display area shows the results of a SELECT query (either entered manually, or by double clicking in the navigator).
You executed a DELETE, so there was no returned resultset…

[quote=338285:@Norman Palardy]No problem it had extraneous spaces
originally it was

[img] http://i.imgur.com/NE12pW8.jpg[/img] 

and that one space between [img] and http matters
go figure[/quote]

norman, thanks for fixing that

Do I want to join in?

Everyone is Welcome, so come on !

:wink:

macOS Sierra 10.12.5 / Tadpole 1.00.056 [32 bit]

@Dave S, here a my findings.
I tried Tadpole on a SQLite database with 168 tables.
Every click on a table gives me a spinning ball.
After a few seconds I can do the next action.
Clicking a table doesn’t show me the data in that table, although there are 249 rows (9 columns) in that table.
Clicking a table with 4 records and 1 column sometimes shows me the data, but only after about 10-20 seconds.
When I select “Schema Diagram” in the Database menu, Tadpole crashes.

[code]UnhandledException: OutOfBoundsException
Current date: 2017-06-30 11:04:46

Executable Name: tadpole
Executable Path: /Users/paul/Desktop/tadpole_ERRORLOG.txt
Executable Size: 5078847
Executable ModificationDate: 2017-06-28 19:44:42
Executable CreationDate: 1904-01-01 00:19:32
Call Stack:
Stack:

FireWindowOpenEvents

XojoFramework$6440
XojoFramework$912
XojoFramework$920
-[NSObject performSelector:withObject:]
__49-[NSApplication(NSResponder) sendAction:to:from:]_block_invoke
_os_activity_initiate_impl
_os_activity_initiate
-[NSApplication(NSResponder) sendAction:to:from:]
-[NSMenuItem _corePerformAction]
-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
-[NSMenu _performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:]
__38-[NSMenu performActionForItemAtIndex:]_block_invoke
_os_activity_initiate_impl
_os_activity_initiate
-[NSMenu performActionForItemAtIndex:]
-[NSMenu _internalPerformActionForItemAtIndex:]
-[NSMenuItem _internalPerformActionThroughMenuIfPossible]
-[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:]
NSSLMMenuEventHandler
_Z22_InvokeEventHandlerUPPP25OpaqueEventHandlerCallRefP14OpaqueEventRefPvPFlS0_S2_S3_E
_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
SendEventToEventTarget
_ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef
SendMenuCommandWithContextAndModifiers
SendMenuItemSelectedEvent
ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2
_ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt
_HandleMenuSelection2
_HandleMenuSelection
_NSHandleCarbonMenuEvent
_DPSEventHandledByCarbon
-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
-[NSApplication(NSEvent) nextEventMatchingMask:untilDate:inMode:dequeue:]
XojoFramework$1294
XojoFramework$1295

XojoFramework$9793
XojoFramework$1294
-[NSApplication run]
XojoFramework$9795
RuntimeRun
[/code]
Quitting Tadpole with above database, makes it crash too.

Tried the same database using SQLiteManager.
I got instant reaction when clicking a table and data is shown instantly.

I would have to see the data to determine why the delay… It does seem the more columns seems to contribute not sure why… for the most part I am seeing Tadpole handle things better than other apps (and when it doesn’t, I see what I can do to correct that :slight_smile: )

As far as the Schema Diagram… I did say that it

Currently it handles larger database drawings better than it did the other day… Right now it actually manipulates a LARGE “picture” object… which I realized was dumb… So I have to redesign that part to handle nodes and vectors as proper “objects” in not only storage but drawing as well.

[quote=338303:@Dave S]as of right now… that is exactly how is is designed to react… the “gray” area is just an “empty” table…
the display area shows the results of a SELECT query (either entered manually, or by double clicking in the navigator).
You executed a DELETE, so there was no returned resultset…[/quote]

Yes, I understand, but I would like to know the number of rows affected (deleted).

I will add that to the to-do list

EDIT : completed for next release, it will indicate the number of affected records for INSERT, UPDATE or DELETE

There is a new version of Tadpole available… still Beta (Alpha for the diagram)
I fixed how it handles fieldnames so those with non-standard characters should now not crash the app.
as well as a few other minor things… It opens all the tables from your database that you mentioned, and a few others I tried…

30Jun2017
- added count of affected records after each script Execution
- added method to protect fieldnames with bad characters such as spaces...
- fixed issue in Navigator that made it slow to scroll 

29Jun2017
- fixed display format for Doubles that were in SciNotation (4.50000e6 becomes 4500000.0)
- fixed issue with commits on insert/updates 

28Jun2017
- fixed broken issue with DELETE ROW
- adjusted Schema Diagram to recoginize composite keys
- added preliminary load/save for Schema Diagram (limited to Desktop/sample.erd for now)

Tadpole for macOS
Tadpole for Windows

Corrected links

Tadpole for macOS
Tadpole for Windows

Looking good Dave.

another update… thanks for all the continuing feedback… this is getting better and better as each day passes :slight_smile:

Download Tadpole for macOS

Download Tadpole for Windows

Tadpole not yet available for Linux

02Jul2017
- Added BLOB Editor to allow import/export and viewing of BLOBS as either Image or Hex values

01Jul2017
- disabled ability to attempt to edit rows in SQLite_xxx tables
- changed default datatype to TEXT if explict datatype is missing and fieldname indicates an aggregate function
- disabled TRUNCATE if selected object is a VIEW
- changed ALTER VIEW to use SCRIPTS instead of discrete SQL... allowed better error control
- changed ALTER TRIGGER to use SCRIPTS instead of discrete SQL... allowed better error control
- changed ALTER INDEX to use SCRIPTS instead of discrete SQL... allowed better error control

30Jun2017
- added count of affected records after each script Execution
- added method to protect fieldnames with bad characters such as spaces...
- fixed issue in Navigator that made it slow to scroll 

another new release is available for testing …
This one has an AWESOME (sorry…:slight_smile: ) Schema Diagram feature… compared to the Diagram function in previous versions of Tadpole.

Note : this version contains ONLY changes to the Schema Diagram

  • much, much, much faster…
  • supports a virtual infintie drawing space
  • All updates occur in realtime
  • now displays View References Lines as well as FK references (View References have no cardinality)
  • View References Lines can be removed from the diagram in a single click (and returned just as fast)
  • Tadpole guesses at the initial cardinatlity, but the user has the ability to change ANY/ALL of them as they choose.
  • By default Tables are one color, and Views are another, this version allows you to set colors on a table by table basis.
  • All connecting vectors can have their color changed
  • View Entities can be removed so the diagram is only Physical Tables
  • When selecting a View or Table Entity, a focus ring is drawn around it, and a focus ring of another color is drawn around ALL tables or views that are connected to the selected entity
  • Drawing data is saved automatically in a file named “.ERD”

What is NOT in this version (yet)

  • Ability to export to a PNG
  • Ability to export to a PDF (this will be in lieu of direct printing, and will use my gPDF class)
  • Ability to recenter the entire diagram (shift everything to the upper/left of the drawing area)
  • Ability to add Labels (with optional Font, Size and Color)
  • Ability to add external images (and resize them … for logos etc)
  • Ability to add “notes” which can be hidden, and/or including in any output
  • and I’m sure I forgot some nifty things :slight_smile:

Download Tadpole for macOS

Download Tadpole for Windows

Tadpole not yet available for Linux

Almost forgot … In order to alter the properties of an object, RIGHT CLICK on it

I tried to open an encrypted sqlite database file with tadpole and the app quit with a crash.

You probably could avoid this by checking for errorcode 21 after trying to connect a database file. I am using the Xojo sqlitedatabase class and this works for me.

List of errorcodes:

'#define SQLITE_OK 0 /* Successful result */ '/* beginning-of-error-codes */ '#define SQLITE_ERROR 1 /* SQL error or missing database */ '#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ '#define SQLITE_PERM 3 /* Access permission denied */ '#define SQLITE_ABORT 4 /* Callback routine requested an abort */ '#define SQLITE_BUSY 5 /* The database file is locked */ '#define SQLITE_LOCKED 6 /* A table in the database is locked */ '#define SQLITE_NOMEM 7 /* A malloc() failed */ '#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ '#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ '#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ '#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ '#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */ '#define SQLITE_FULL 13 /* Insertion failed because database is full */ '#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ '#define SQLITE_PROTOCOL 15 /* Database lock protocol error */ '#define SQLITE_EMPTY 16 /* Database is empty */ '#define SQLITE_SCHEMA 17 /* The database schema changed */ '#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ '#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ '#define SQLITE_MISMATCH 20 /* Data type mismatch */ '#define SQLITE_MISUSE 21 /* Library used incorrectly */ '#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ '#define SQLITE_AUTH 23 /* Authorization denied */ '#define SQLITE_FORMAT 24 /* Auxiliary database format error */ '#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ '#define SQLITE_NOTADB 26 /* File opened that is not a database file */ '#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ '#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ '/* end-of-error-codes */

That is interesting… becase Tadpole DOES do that… and even has facilities to ask for the password if it detects that… Although I will admit that I have not tested that portion of it much… Thanks for pointing that out.

I was more focused on the major features. but that will go on Todays bug fix list :slight_smile:

EDIT : issue has been verified…

Dave, I know this is a low priority thing but in my relative simple and straight forward environment, it’s the only problem I’ve found.

I use the Magic Mouse on MacOS. Works fine most places but on the Schema Diagram, I cannot scroll with gestures on the mouse.

But I also want to say I really like TadPole and will be purchasing it when ready. My question, because I work on both Mac and PC, do I only have to buy it once for both platforms or do I have to buy a Mac Version and a Windows Version.

Very nice job Dave!!!

Thanks William… I do not use a MM myself, but I do have a scroll wheel, and Tadpole will be making use of it very soon…
The Schema Diagram feature has changed ALOT in the past few days, and I think it is a lot better than my first attempt by a few orders of magnitude :slight_smile:

I have not yet decided on the pricing for Tadpole, but the macOS and Windows versions will be separate products, but I will most likely offer a package discount for buying both versions or multiple copies of one or the other. Note : Tadpole installs are for a single computer