• Welcome to SQLitening Support Forum. Please login.
 
December 03, 2021, 06:55:26 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 - Fim

121
I thought it was something like that.
But  how to do it in PowerBasic?
/Fim W
122
If I use SELECT * FROM PERSONAL ORDER BY NAME
the  result will be
123
Now I have found the final solution:

SOK_ROWID:
    sStatement  = "SELECT ROWID from ordlista where ord = ? and Ordlista_nr =" +  str$(ordlista_nr)
    BIND_DATA1   = slBuildBindDat(TRIM$(ORD), "TN")
    SVAR = SlSelBind(sStatement, BIND_DATA1)
    SVAR = slGetRow
    RADNR = VAL(SLFX(1))

BORTTAGET:
    SVAR = SLEXE ("DELETE FROM ORDLISTA WHERE ROWID = " + $SQ + STR$(RADNR) + $SQ)
    IF SVAR = 0 THEN BORTTAG_ORD = 0


124
I chose the solution by reading the words of the current length, and then use the row IDs for removal.
Fim W.
125

Thanks, that sounds reasonable. I will do so.
/Fim W.
126
I will create an entirely new database of approximately 4,000,000 records. with four different indices.
My program will use the index 1 in almost all cases. And I want to optimize speed when I read the database via index 1
Should I sort my input at index 1 before loading databse or it does not matter?
/Fim
127
cj
Right now I'm moving to Ystad, so it takes a while before I engage the issue again.
128
Cj
I will test "Create table if not exists WordTable(rec_num Integer, word Primary Key UNIQUE) WITHOUT ROWID
129
Cj.

I have been successful to get the ROWID by reading each word with a certain length.
Then I deleted the entry using the ROWID.
But your solution with Serch to get the ROWID is much better.
Many thanks for the help.

Fim W.
130
 I should be able to find the row id of the word I want to remove by reading each word with the current length. I'll tell you later how it goes.
Fim W.
131
I am having trouble removing an encrypted item.

Here is the DDL translated to english at the right:


CREATE TABLE Ordlista(
    Langd       Integer     not null ,   Length
    Ord         Text        not null,    Word
    Grupp       Text        not null,    Group
    Ordlista_nr Integer     not null,    Word list n:o
    Unique(Ord, Ordlista_nr)); 

   
I add a word to my tabel in this way:
 
 
FUNCTION SKRIV_ORD (BYREF ORD AS STRING, BYREF SPRAK AS STRING, BYREF GRUPP AS STRING, BYREF NR AS LONG) AS LONG
'===============================================================================================================
'
    DIM LANGD                           AS STRING
    DIM SVAR                            AS LONG

STARTSEKVENS:
    LANGD = STR$(LEN(TRIM$(ORD)))
    slSetProcessMods "K" + KRYPTERINGSNYCKEL_ORD

BYGG_UPP_POSTEN:
    sStatement  = "insert into Ordlista values(?,?,?,?)" '4-columns
    BIND_DATA1   = slBuildBindDat(LANGD,      "I")  + _
                   slBuildBindDat(TRIM$(ORD), "TN") + _
                   slBuildBindDat(GRUPP,      "T")  + _
                   slBuildBindDat(STR$(NR),   "I")

SKRIV_IN:
    SVAR = slExeBind(sStatement,BIND_DATA1, "E0")
    IF SVAR = 19 THEN
        SKRIV_ORD = 1
        EXIT FUNCTION
    END IF
    IF SVAR <> 0 THEN
        FELTEXT = "Fel i SKRIV_ORD. Svar=" + STR$(SVAR) + "  LANGD=" + LANGD + "  GRUPP=" + GRUPP + "  ORD=" + ORD
        CALL SQL_FEL
        EXIT FUNCTION
    END IF
    SKRIV_ORD = 0

END FUNCTION


and it works as i should.

Then I will delete the word and have tried this:
 

FUNCTION BORTTAG_ORD (BYREF ORD AS STRING, BYREF SPRAK AS STRING, BYREF GRUPP AS STRING, BYREF NR AS LONG) AS LONG
'===============================================================================================================
'
    DIM LANGD                           AS STRING
    DIM SVAR                            AS LONG

STARTSEKVENS:
    LANGD = STR$(LEN(TRIM$(ORD)))
    slSetProcessMods "K" + KRYPTERINGSNYCKEL_ORD

BYGG_UPP_POSTEN:
    sStatement  = "delete from Ordlista values(?,?,?,?)" '4-columns
    BIND_DATA1   = slBuildBindDat(LANGD,      "I")  + _
                   slBuildBindDat(TRIM$(ORD), "TN") + _
                   slBuildBindDat(GRUPP,      "T")  + _
                   slBuildBindDat(STR$(NR),   "I")

BORTTAGER:
    SVAR = slExeBind(sStatement,BIND_DATA1, "E0")    <=============    The message box is showing the value 1
    MSGBOX "BORTTAG_ORD SVAR=" + STR$(SVAR)
    IF SVAR = 19 THEN
        BORTTAG_ORD = 1
        EXIT FUNCTION
    END IF
    IF SVAR <> 0 THEN
        FELTEXT = "Fel i BORTTAG_ORD. Svar=" + STR$(SVAR) + "  LANGD=" + LANGD + "  GRUPP=" + GRUPP + "  ORD=" + ORD
        CALL SQL_FEL
        EXIT FUNCTION
    END IF
    BORTTAG_ORD = 0

END FUNCTION


Pls help me
Fim W.
   
132
It seems there was exciting. I'll look at.
133
The idea of an encrypted disk or folder is probably a good approach in some cases. But in my case when I sell an application that will be installed at each customer it is more appropriate with an encrypted database. Now I encrypt some parts of the databases consisting of approximately 4,000,000 Swedish word.
134
Thank you.
It appears to be interesting.
You can buy a binary format of SQLite with encryption built in.
135
Someone who has experience to encrypt the entire database?
And if so, with which product is most suitable?
It belongs to the point that I can not either C or C ++