• Welcome, Guest. Please login.
 
October 25, 2021, 08:48:36 PM

News:

Welcome to the SQLitening support forums!


Show posts

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.

Messages - Rolf Brandt

16
Unfortunately there SQLite does not support row_number and there is no equivalent in it.
http://www2.sqlite.org/cvstrac/wiki?p=UnsupportedSqlAnalyticalFunctions

I usually use a little function with slGetRow by generating a row_number. (See example below)


FUNCTION GetRows () AS LONG
   LOCAL NumFlds         AS STRING
   LOCAL Rec             AS STRING
   LOCAL i               AS LONG
   LOCAL row_number      AS LONG
   LOCAL recset          AS STRING


   slopen "sample.db3"
   slSel "SELECT rowid,Redref,Manuf,Product FROM Parts ORDER BY Redref LIMIT 5"
   ' Process records
   DO WHILE slGetRow
      ' When a row is returned, you use the slF, slFN, slFX, slFNX functions.
      INCR row_number
      Rec = FORMAT$(row_number) & " - "
      FOR i = 1 TO slGetColumnCount
         Rec = Rec & slF(i) & " - "
      NEXT
      recset += rec & $CRLF
   LOOP

   MSGBOX recset
END FUNCTION


Rolf
17
Here is a little tool that I have written for myself to examine SQLite databases  It lists all tables, indexes, triggers, etc. in the database. It also shows all SQL commands that were used to create the database. This is done by reading the sqlite_master table, a system table where SQLite stores its information about the structure of the database.

You can copy the different SQL commands that created the database to the clipboard to use them. You also can quickly create a new empty copy of a database.

SQLite3.dll needs to be on your computer, either in the Windows, System32, or your program folder.

Maybe it is useful for someone else. Comments are welcome. The tool was written in PowerBasic 10 and PlanetSquires FireFly 3 (http://www.planetsquires.com/) as Visual Designer.

Rolf
18
You must have started at an early age, Paul!
;-)
19
dBase III plus and Clipper Summer 87 used to be my toys!

Rolf
20
From the Help file:

slIsOpen () Long
Returns %TRUE if there is a database open.

Additionally:

slGetDatabaseAndFileNames  () String
Returns a list of database and file names that are currently opened and attached.  The name entries are returned as a delimited text string which is $NUL separated.  Each entry contains two elements, a database name and a file name. The two elements are separated by the vertical bar (|) character. The first entry is always the Main database from the slOpen command.  The second entry will be the Temp database, but only if there are temporary tables currently created.  The rest of the entries, if any, will be the attached databases.  There are no file names assigned to temporary tables nor temporary databases. Will return an empty string if there is no open database.

These functions of course will detect only if they are opened by your program, not by another program.

Rolf
21
No problem, Paul. Just send me the help text file (in case there are more changes). Meanwhile here are the update Chm and Pdf files.
Thank you also cj.

Rolf
22
General Board / Re: Berkeley DB
August 06, 2013, 04:17:07 AM
Thats exactly what I thought of, multiuser environment. A lot of my customers host their databases on an online server. But they probably won't be willing to pay the price for an commercial license. My clients are smaller taxi and ambulance services - not exactly the richest clentele.

Rolf
23
General Board / Re: Berkeley DB
August 05, 2013, 03:56:18 AM
I just read the Wikipedia article about Berkeley DB. Sounds very interesting. Could be a real boost. Would be worth trying it out.

Rolf
24
How to Register for this Forum / Re: New Member
July 31, 2013, 04:15:51 AM
Welcome,

I hope SQLitening will be the answer to your problems.

Basically SQLitening uses of course the SQLite engine, and thus performance will be the same. But you will get a boost if you use it in a network environment.

Rolf
25
General Board / Re: Power Basic Down ??
July 25, 2013, 06:02:56 AM
They are up again...

Rolf
26
General Board / Re: Power Basic Down ??
July 23, 2013, 12:15:46 PM
No need to worry - here is a quotation of a member of the FireFly Forum who inquired at PB:

QuoteActually we moved into a new shop, and have more resources to help us out with.  The website may be down for another day or 2, and the phone is in the process of switching carriers, possibly going voip.  Sorry for any difficulty, we are trying to get this up as fast as possible.

Our email server is part of the installation, so we have to deal with this on a email-by-email basis.

When our servers are 100% up we will be doing some more sales, so keep checking in!

Thank you,

Jim Bailey
PowerBASIC Staff
27
General Board / Re: Power Basic Down ??
July 23, 2013, 03:46:15 AM
Yes - can't be found.

rb
28
Fields with Null-values can be a little tricky sometimes. This works:


SELECT * FROM Table WHERE fieldname  is null


Alternatively - if you want to test for null-values and the number 0 (Zero) you can use this:


SELECT * FROM Table WHERE fieldname  is null OR fieldname = 0


I had been out for a Jazz festival in the Pfalz area of Germany for a couple of days. No computer along (except a smartphone), just enjoying the sun, good music, excellent food, and great wines. Had a great time.

Rolf
29
Welcome Carlos,

you chose a good combination. If you do a search in the FF forum with "SQLitening" you will find some example code.


  • There is an "SQLitening for Beginners" FF3 project.
  • You also can use the SQLitening includes for the FF Functions Library which make life a little easier.

Rolf
30
How to Register for this Forum / Re: Hi
July 09, 2013, 06:13:35 AM
Seems the lates versions of Wine do now support Windows Services. Check here:

https://help.ubuntu.com/community/WineServer

In case you give it a try I would love to here your experience.


Rolf