Ich habe eine SQL Database Library entwickelt, mit der man auch Blobs verwenden kann.
Die Blobs können Zudem noch Verschlüsselt oder komprimiert werden.
Sie benötigt keine externe Dll oder sonstige Zusatzdatein.
Außerdem enthält die Library ein Management Studio zur einfachen verwendung.
Die Komplette Lib ist Opensource und unter Zlib-Licence veröffentlicht.

Weitere Screenshots:
http://www.rocketrider.eu/ScreenShots/D ... udio_1.jpg
http://www.rocketrider.eu/ScreenShots/D ... udio_3.jpg
http://www.rocketrider.eu/ScreenShots/D ... udio_4.jpg
Documentation:
DB_Create(sFile.s, bCompressed = #True)
Creates a new database file. The file is compressed by windows (note the file size is limited to 30 GB in this case) by default.
The function returns true for success.
DB_Open(sFile.s)
Opens an already existing database file.
The function returns true for success.
DB_Close(*Database.DATABASE)
Closes the database.
The function returns true for success.
DB_Update(*Database.DATABASE, sStatement.s)
Executes a statement, like DB_UpdateSync() but all calls to DB_Update() are in one transaction. So the command is much faster as DB_UpdateSync().
The transaction is commited if DB_UpdateSync(). DB_Query(), DB_Close() or DB_Flush() is called.
The function returns true for success.
DB_UpdateSync(*Database.DATABASE, sStatement.s)
Executes a statement.
The function returns true for success.
DB_Query(*Database.DATABASE, sStatement.s)
Begins a query. DB_EndQuery() must be called to end the query.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_EndQuery(*Database.DATABASE)
Ends a query started with DB_Query().
The function returns true for success.
DB_SelectRow(*Database.DATABASE, iRow.i)
Selects a row. The command is neccessary for DB_GetAsString(), DB_GetAsLong(), DB_GetAsQuad(), DB_GetAsDouble(), DB_GetAsBlobPointer(), DB_GetAsBlobSize(), DB_GetAsBlobFlags(), GetNumColumns(), DB_GetColumnTypeAsString() and DB_GetColumnName().
For the first row the parameter iRow must be 0.
Note: DB_SelectRow() must be called in a DB_Query()...DB_EndQuery() block.
The function returns true for success.
DB_GetAsString(*Database.DATABASE, iColumn.i)
Returns the value of the column as string. For the first column the parameter iColumn must be 0.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetAsLong(*Database.DATABASE, iColumn.i)
Returns the value of the column as long (32-bit integer). For the first column the parameter iColumn must be 0.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetAsQuad(*Database.DATABASE, iColumn.i)
Returns the value of the column as quad (64-bit integer). For the first column the parameter iColumn must be 0.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetAsDouble(*Database.DATABASE, iColumn.i)
Returns the value of the column as double. For the first column the parameter iColumn must be 0.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetAsBlobPointer(*Database.DATABASE, iColumn.i)
Returns a pointer to the blob. FreeMemory() must be called after the memory is not needed anymore. For the first column the parameter iColumn must be 0.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetAsBlobSize(*Database.DATABASE, iColumn.i)
Returns the size of a blob in bytes. For the first column the parameter iColumn must be 0. It is faster to use MemorySize() instead of this function.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetAsBlobFlags(*Database.DATABASE, iColumn.i)
Returns the flags of a blob. For the first column the parameter iColumn must be 0.
Note: DB_SelectRow() must be called before this command.
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
DB_GetNumColumns(*Database.DATABASE)
Returns the number of the column. DB_SelectRow() must be called before this command.
DB_GetColumnTypeAsString(*Database.DATABASE, iColumn.i)
Returns the type of the column as string. For the first column the parameter iColumn must be 0. DB_SelectRow() must be called before this command.
DB_GetColumnName(*Database.DATABASE, iColumn.i)
Returns the name of the column as string. For the first column the parameter iColumn must be 0. DB_SelectRow() must be called before this command.
DB_StoreRow(*Database.DATABASE)
Stores a row in the database. This is neccessary aafter setting the values of a row with DB_StoreAsLong(), DB_StoreAsQuad(), DB_StoreAsDouble(), DB_StoreAsString() and DB_StoreAsBlob().
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_StoreAsLong(*Database.DATABASE, iColumn.i, lValue.l)
Stores an integer as long (32-bit). For the first column the parameter iColumn must be 0.
Note: After setting all values of a row, DB_StoreRow() must be called to store it in the database
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_StoreAsQuad(*Database.DATABASE, iColumn.i, qValue.q)
Stores an integer as quad (64-bit). For the first column the parameter iColumn must be 0.
Note: After setting all values of a row, DB_StoreRow() must be called to store it in the database
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_StoreAsDouble(*Database.DATABASE, iColumn.i, dValue.d)
Stores a float point value as double. For the first column the parameter iColumn must be 0.
Note: After setting all values of a row, DB_StoreRow() must be called to store it in the database
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_StoreAsString(*Database.DATABASE, iColumn.i, sText.s)
Stores a string. For the first column the parameter iColumn must be 0.
Note: After setting all values of a row, DB_StoreRow() must be called to store it in the database
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_StoreAsBlob(*Database.DATABASE, iColumn.i, *Pointer.i, iSize.i, iFlags.i = #DB_BLOB_DEFAULT)
Stores a blob. For the first column the parameter iColumn must be 0. The parameter iFlags can be any combination of #DB_BLOB_COMPRESSED and DB_BLOB_ENCRYPTED Or just #DB_BLOB_DEFAULT for no compression And encryption.
Please note if a blob is compressed and encrypted and later decrypted with the wrong key, the application will probably crash, as there is no check whether decrypted data is correct.
Note: After setting all values of a row, DB_StoreRow() must be called to store it in the database
Important: You cannot use DB_Store... commands and DB_GetAs... commands in the same DB_Query()... DB_EndQuery() block.
The function returns true for success.
DB_GetLastErrorString()
Returns an error string for the last executed command.
DB_ShowQuery(*Database.DATABASE, sStatement.s, iWidth.i = -1, iHeight = -1, sTitle.s = "")
shows the result of the query in a window.
The function returns true for success.
DB_SetCryptionKey(*Database.DATABASE, sKey.s)
Sets the key to decrypt/encrypt blobs
The function returns true for success.
DB_SetCompressionLevel(*Database.DATABASE, iCompressionLevel.i = 9)
Sets the compression level for compressed blobs. The value can be between 0 and 9
The function returns true for success.
DB_Flush(*Database.DATABASE)
Makes sure that all changes are committed, if DB_Update() is used.
The function returns true for success.
DB_GetSQLiteVersion()
Returns the SQlite verion as string.
Licence:
Copyright (c) 2009 RocketRider
Diese Software wird ohne ausdrückliche oder implizierte Garantie bereitgestellt. In keinem Fall können die Autoren für irgendwelche Schäden, die durch die Benutzung dieser Software entstanden sind, haftbar gemacht werden.
Es ist jedem gestattet, diese Software für jeden Zweck, inklusive kommerzieller Anwendungen, zu benutzen, zu verändern und sie frei weiterzuverbreiten, sofern folgende Bedingungen erfüllt sind:
Die Herkunft dieser Software darf nicht falsch dargestellt werden; Sie dürfen nicht angeben, dass Sie die ursprüngliche Software geschrieben haben. Wenn Sie diese Software in einem Produkt benutzten, würde eine Erwähnung geschätzt werden, sie ist aber nicht erforderlich.
Veränderte Quelltextversionen müssen deutlich als solche gekennzeichnet werden und dürfen nicht als die Originalsoftware dargestellt werden.
Diese Notiz darf in den Quelltexten nicht verändert oder gelöscht werden.
Download:
http://www.rocketrider.eu/Files/SQL-Man ... Studio.zip
Gruß
RocketRider