realbasic-nug
[Top] [All Lists]

Re: SaveInfo stored in RSQLDb not working

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: SaveInfo stored in RSQLDb not working
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Sat, 30 Jul 2005 21:56:12 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <9AD9BB5C-D2A5-4EAB-8A56-387339217EF6 at kellerfarm dot com> <3889FC31-40FF-48A4-8071-6CC8E6667DE4 at bradrhine dot com> <B02AC57A-8CB9-4A7F-9C70-B3E985F849EC at kellerfarm dot com>

On Jul 30, 2005, at 9:44 PM, andrew at kellerfarm dot com wrote:

For storing:
<connect to database>
<get recordset>
rs.Field("FileLocOSX").Value = EncodeBase64(f.GetSaveInfo(Nil))
rs.Update
db.Commit
db.Close

For retrieving:
<connect to database>
<get recordset>
s = DecodeBase64(rs.Field("FileLocOSX").Value)
f = GetFolderitem(s)

The debugger shows that a string is retrieved out of the database, however GetFolderitem can't make a folderitem with it for some reason.

Andrew Keller

just for fun insert it and retrieve it immediately and compare it to what you just put in.

Something like

        dim s1 as string
        dim s2 as string
        
        <connect to database>
        <get recordset>
        s1 = f.GetSaveInfo(Nil)
        rs.Field("FileLocOSX").Value = EncodeBase64(s1)
        rs.Update
        db.Commit
        
        <get recordset>
        s2 = DecodeBase64(rs.Field("FileLocOSX").Value)
        
        if s1 <> s2 then ....

make sure s1 and s2 have the same encoding (whatever it might be)



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>