Re: Writing update back to MSAccess table?
- From: "planetthoughtful" <planetthoughtful@xxxxxxxxx>
- Date: 21 Sep 2006 20:41:25 -0700
Nicholas Paldino [.NET/C# MVP] wrote:
My guess is that the query is actually wrong. The code here is solid
(with the exception of maybe a using statement on the command, but that's a
minor oversight, as well as the fact that you should parameterize this
query). You don't have to do a flush or anything, the provider will take
care of everything.
Are you sure that the tblSettings table has a row where the value of the
setting column is "remainreward"?
If so, then can you provide a complete example (along with mdb file)?
Hi Nicholas,
When the application is first executed, it reads the row with a
[setting] value of 'remainreward' successfully, executing this SQL
statement: SELECT settingval from tblSettings WHERE setting =
'remainreward'
This currently returns a value of '15', which is what is in the table
for this record.
The SQL being executed to update this row when the application closes
is (this is copied from writing the value of CommandString out via
Console.WriteLine):
UPDATE tblSettings SET settingval = '20' WHERE setting = 'remainreward'
However, the value against 'remainreward' in the settingval column
always stays as '15', and never actually updates to '20', as expected.
All the best,
pt
.
- Follow-Ups:
- Re: Writing update back to MSAccess table?
- From: planetthoughtful
- Re: Writing update back to MSAccess table?
- References:
- Writing update back to MSAccess table?
- From: planetthoughtful
- Re: Writing update back to MSAccess table?
- From: Nicholas Paldino [.NET/C# MVP]
- Writing update back to MSAccess table?
- Prev by Date: Re: Username & Password as parameters
- Next by Date: Re: Forms
- Previous by thread: Re: Writing update back to MSAccess table?
- Next by thread: Re: Writing update back to MSAccess table?
- Index(es):
Relevant Pages
|