Sorry to tell you Fred passed away in January 2013
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Quote#===================<[ Version 1.4 July 12, 2010 ]>===================
1. SQLitening.Dll is now thread-safe. You can now have multiple threads
accessing your SQLite database in both local and remote mode. This
will allow you to have multiple connections per client to the server,
one for each thread. This can greatly increase response time for
situations where you can take advantage of multiple threads. A new
example program (ExampleD.Bas) is included using multiple theads.
This new feature also allows database Procs to use SQLitening.Dll
rather than have to call SQlite direct (makes coding Procs much easier).
There is a new Proc (SQLiteningProcB.Bas) included using this new feature.
Select Age from MyTable Order by Age Limit 1 Offset 2
Select Age from MyTable Order by Age Limit 2,1
QuoteThe LIMIT clause is used to place an upper bound on the number of rows
returned by a SELECT statement. Any scalar expression may be used in the
LIMIT clause, so long as it evaluates to an integer or a value that can be
losslessly converted to an integer. If the expression evaluates to a NULL
value or any other value that cannot be losslessly converted to an
integer, an error is returned. If the LIMIT expression evaluates to a
negative value, then there is no upper bound on the number of rows
returned. Otherwise, the SELECT returns the first N rows of its result
set only, where N is the value that the LIMIT expression evaluates to.
Or, if the SELECT statement would return less than N rows without a LIMIT
clause, then the entire result set is returned.
The expression attached to the optional OFFSET clause that may follow a
LIMIT clause must also evaluate to an integer, or a value that can be
losslessly converted to an integer. If an expression has an OFFSET
clause, then the first M rows are omitted from the result set returned by
the SELECT statement and the next N rows are returned, where M and N are
the values that the OFFSET and LIMIT clauses evaluate to, respectively.
Or, if the SELECT would return less than M+N rows if it did not have a
LIMIT clause, then the first M rows are skipped and the remaining rows (if
any) are returned. If the OFFSET clause evaluates to a negative value,
the results are the same as if it had evaluated to zero.
Instead of a separate OFFSET clause, the LIMIT clause may specify two
scalar expressions separated by a comma. In this case, the first
expression is used as the OFFSET expression and the second as the LIMIT
expression. This is counter-intuitive, as when using the OFFSET clause
the second of the two expressions is the OFFSET and the first the LIMIT.
This is intentional - it maximizes compatibility with other SQL database
QuoteFunction slBuildBindDat alias "slBuildBindDat" (rsData as String, _
optional byval rsModChars as String)Export as String
' Returns a BindDat entry which is a specially formatted string required
' by slExeBind. Data contains the value you want converted into a BindDat.
' A BindDat(s) is required to be passed to slExeBind. The returned data
' may also be compressed and/or encrypted. If an error occurs then the
' return value will be an empty string. Use slGetError or slGetErrorNumber
' to determine the error.
' B = Bind as Blob. This is the default.
' C = Compress the data. Only use with Blob or Text.
' N = Encrypt the data. Only use with Blob or Text. Requires a crypt key to
' be set using slSetProcessMods.
' T = Bind as Text. Default is to bind as Blob.
' i = Bind as Integer 32 bit (must be the only ModChar). Default is to bind as Blob.
' I = Bind as Integer 64 bit (must be the only ModChar). Default is to bind as Blob.
' D = Bind as Double (must be the only ModChar). Default is to bind as Blob.
' Z = Bind as Null (must be the only ModChar). Default is to bind as Blob.
' Note: If both C and N then will first compress and then encrypt.
QuoteIn SQLiteningServer.Cfg the Hosts line must be IP address # and not hosts or a name on my system.These are not "required". I never handle my own errors. I just let SQLitening do it's thing, much less work.
slSetProcessMods "E0" 'See different values. This handles your own errors, result is optional.
QuoteIs it best practice to save Images in a separate table?All depends on how often they are accessed. If not as often as the other fields then I would consider using another file and doing slAttach only when the image is needed.
QuoteHow do you insert a $NUL into F1 to automatically increment the rowid?slExeBind slBuildInsertOrUpdate("T1", "NULL" & $Nul & "?" & $Nul & "?"), s
Declare Function slGetInsertID lib "SQLitening.Dll" alias "slGetInsertID" () as Long
QuoteFred's joins and binds are much faster than thisl
If anyone can show me how to use Freds' method to JOIN Bind instead of this it would be appreciated
Local x as Long
Local s as String
Dim lsaA(1000) as String
for x = 0 TO 1000
lsaA(x) = "This is a string # " & format$(x)
s = join$(lsaA(), "")