New topic: 

Update again

<http://forums.realsoftware.com/viewtopic.php?t=29368>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       martinpaulrice           Post subject: Update againPosted: Mon 
Aug 03, 2009 4:08 pm                        
Joined: Wed Apr 11, 2007 1:17 pm
Posts: 16              I, as so many beginners, am having difficulty updating 
records in a db. I've spent literally hours over the last week reading the 
forum on the subject and see all sorts of points of view about how to do it: 
with recordsets, without recordsets, with sql UPDATE, etc. I've also looked 
carefully at the database example from the extras, which I find rather 
complicated -- again as many beginners have written they do, too. So I'm 
looking for some help. Basically this is what I'm doing in my code:

  Code:sqlu = "UPDATE Accounts SET AcctType = trim(rbValue), AcctName = 
fldAcctName.Text, AcctBal = fldAcctBal.Text WHERE RowID = lkFor"
App.BudgetDB.SQLExecute sqlu
App.BudgetDB.Commit


Before this point I've successfully read the db into a list box; I can click on 
a record in the listbox and put the fields into edit fields on the screen 
(these are the rbValue, fldAcctName, etc.)

Then when I try to change the db using the code above it just doesn't work, 
that is, I have code which puts the changed record back into the list box 
successfully (that's after the code I quoted here), but when I re-run the app, 
the changed record isn't in the listbox, just the one that I changed in its 
unchanged form.

Can anyone help me get this straight?

Thanks.     
_________________
Martin
Signal Mountain, TN  
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to