[V4RB] Table working with 1.9.7 but not with 1.9.8

Stan Busk maxprog at mac.com
Sat Sep 13 11:00:40 CDT 2003


Hi,

I have a problem with V4RB 1.9.8. My app uses a table to store 
preferences with name 'Preferences'. This table has always been working 
well with 1.9.7 Yesterday I found out that since I upgrade to 1.9.8 the 
table is no longer working, I store strings to it but when I go reading 
it back, they are always empty. I have been checking the whole table 
during hours but everything is correct. Finally I decided to replace 
1.9.8 with 1.9.7 and the table is working again. I have no explanation 
for this.

 > The table name is boPrefs of type VBaseObject with following fields:

Sub boPrefs()
    name = "Preferences"
    PrefEntryName    = new VvarChar ("PrefEntry_Name",   64, "ASCII", 
kV_Unique + kV_Indexed) 'PrefEntry Name
    PrefEntryValue   = new VvarChar ("PrefEntry_Value", 256, "ASCII", 
-1)                     'PrefEntry Value
    PrefEntryRecord  = new VULong   ("PrefEntry_Record", kV_Indexed)     
                      'PrefEntry Record ID
End Sub

 > The funnction that doesnt work on 1.9.8 but work with 1.9.7 is:

Sub Update(inRec As Integer, inValue As String)
    If GotoRecID(inRec) then
       PrefEntryValue.SetString(inValue) 'Set PrefEntry Value
       UpdateRecord
       Flush
    end if
End Sub

 > I call this function thru my code this way:

Sub Prefs_SetValue(inDatabase As DB_Data, inKey As String, inValue As 
String)
    Dim aCursor as VCursor
    Dim aResult As String
    Dim aErr As Boolean

    aCursor = nil
    aCursor = inDatabase.SQLselect("Select * from Preferences where 
PrefEntry_Name='"+inKey+"'")
    if aCursor<>nil then
       if aCursor.RecordCount>0 then
          
inDatabase.mPrefs.Update(aCursor.ULongField("PrefEntry_Record").Value, 
inValue)
       else
          inDatabase.mPrefs.Add(inKey, inValue)
       end if
    end if
End Sub

I have no idea why this table has stopped working on 1.9.8, my app uses 
22 tables, this one is the only that has stopped working.

Stan



More information about the Valentina mailing list