|
|
|
date: Mon, 30 Jun 2008 02:30:01 -0700,
group: microsoft.public.dotnet.languages.vb.data
back
Mdb file not updating - VB 2008 Express
I have created a new form project in vb 2008 express, and added a data-source
pointing to a simple mdb file on my local hard drive at C:/DelMe.
If I open the data using the database explorer (rather than the datasource
explorer) and right click on a table and retrieve the data, then I can see
the data and update it from within vb, and changes are actually made to the
data in the mdb file.
However, if a create either a data grid or bound text boxes which use the
datasource and then run the application, changes show up in the application
and are seemingly made (ie the datasource is being correctly updated), but
these changes are not propagated back to the mdb file.
In the datsource explorer, the tableadapter has both fill() and getdata()
listed, and the sql for update seems fine (as it does for the select method
which works correctly).
Why are the changes not being propagated back to the mdb file, and how can I
debug this ?
Thanks
date: Mon, 30 Jun 2008 02:30:01 -0700
author: Ycrl
Re: Mdb file not updating - VB 2008 Express
On Mon, 30 Jun 2008 02:30:01 -0700, Ycrl wrote:
¤ I have created a new form project in vb 2008 express, and added a data-source
¤ pointing to a simple mdb file on my local hard drive at C:/DelMe.
¤
¤ If I open the data using the database explorer (rather than the datasource
¤ explorer) and right click on a table and retrieve the data, then I can see
¤ the data and update it from within vb, and changes are actually made to the
¤ data in the mdb file.
¤
¤ However, if a create either a data grid or bound text boxes which use the
¤ datasource and then run the application, changes show up in the application
¤ and are seemingly made (ie the datasource is being correctly updated), but
¤ these changes are not propagated back to the mdb file.
¤
¤ In the datsource explorer, the tableadapter has both fill() and getdata()
¤ listed, and the sql for update seems fine (as it does for the select method
¤ which works correctly).
¤
¤ Why are the changes not being propagated back to the mdb file, and how can I
¤ debug this ?
See if the following applies to your scenario:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=427451&SiteID=1
Paul
~~~~
Microsoft MVP (Visual Basic)
date: Thu, 03 Jul 2008 10:39:18 -0500
author: Paul Clement
Re: Mdb file not updating - VB 2008 Express
Dear Paul (Mr Clement),
Thanks for the link.
But:
1) The mdb file is not included in the project, so the 'copy if newer/copy
always/never copy' prioperty does not apply to the mdb file.
2) Does the update command have any relevance to the datagrid or to bound
controls ? Doesn't vb do the updating automatically ?
Is this a bug (in which case it should be easily reproducible) or am I being
stupid ?
How can I debug or solve this problem ?
Thanks in advance for your kind reply.
"Paul Clement" wrote:
> On Mon, 30 Jun 2008 02:30:01 -0700, Ycrl wrote:
>
> ¤ I have created a new form project in vb 2008 express, and added a data-source
> ¤ pointing to a simple mdb file on my local hard drive at C:/DelMe.
> ¤
> ¤ If I open the data using the database explorer (rather than the datasource
> ¤ explorer) and right click on a table and retrieve the data, then I can see
> ¤ the data and update it from within vb, and changes are actually made to the
> ¤ data in the mdb file.
> ¤
> ¤ However, if a create either a data grid or bound text boxes which use the
> ¤ datasource and then run the application, changes show up in the application
> ¤ and are seemingly made (ie the datasource is being correctly updated), but
> ¤ these changes are not propagated back to the mdb file.
> ¤
> ¤ In the datsource explorer, the tableadapter has both fill() and getdata()
> ¤ listed, and the sql for update seems fine (as it does for the select method
> ¤ which works correctly).
> ¤
> ¤ Why are the changes not being propagated back to the mdb file, and how can I
> ¤ debug this ?
>
> See if the following applies to your scenario:
>
> http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=427451&SiteID=1
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
date: Thu, 3 Jul 2008 09:53:01 -0700
author: Ycrl
Re: Mdb file not updating - VB 2008 Express
Ah, VB won't call update on its own. It can't/won't commit the data without
you telling it to--regardless of the DBMS engine.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhikerâs Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Ycrl" wrote in message
news:54157CB6-E2C4-4496-8E1C-7F4D3EBC61A7@microsoft.com...
> Dear Paul (Mr Clement),
>
> Thanks for the link.
>
> But:
> 1) The mdb file is not included in the project, so the 'copy if newer/copy
> always/never copy' prioperty does not apply to the mdb file.
> 2) Does the update command have any relevance to the datagrid or to bound
> controls ? Doesn't vb do the updating automatically ?
>
> Is this a bug (in which case it should be easily reproducible) or am I
> being
> stupid ?
> How can I debug or solve this problem ?
>
> Thanks in advance for your kind reply.
>
> "Paul Clement" wrote:
>
>> On Mon, 30 Jun 2008 02:30:01 -0700, Ycrl
>> wrote:
>>
>> ¤ I have created a new form project in vb 2008 express, and added a
>> data-source
>> ¤ pointing to a simple mdb file on my local hard drive at C:/DelMe.
>> ¤
>> ¤ If I open the data using the database explorer (rather than the
>> datasource
>> ¤ explorer) and right click on a table and retrieve the data, then I can
>> see
>> ¤ the data and update it from within vb, and changes are actually made to
>> the
>> ¤ data in the mdb file.
>> ¤
>> ¤ However, if a create either a data grid or bound text boxes which use
>> the
>> ¤ datasource and then run the application, changes show up in the
>> application
>> ¤ and are seemingly made (ie the datasource is being correctly updated),
>> but
>> ¤ these changes are not propagated back to the mdb file.
>> ¤
>> ¤ In the datsource explorer, the tableadapter has both fill() and
>> getdata()
>> ¤ listed, and the sql for update seems fine (as it does for the select
>> method
>> ¤ which works correctly).
>> ¤
>> ¤ Why are the changes not being propagated back to the mdb file, and how
>> can I
>> ¤ debug this ?
>>
>> See if the following applies to your scenario:
>>
>> http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=427451&SiteID=1
>>
>>
>> Paul
>> ~~~~
>> Microsoft MVP (Visual Basic)
>>
date: Thu, 3 Jul 2008 14:56:51 -0700
author: William Vaughn [MVP]
Re: Mdb file not updating - VB 2008 Express
Now I am completely confused.
I am using databound grids and databound controls. Are those not supposed to
automatically perform the updates to the mdb file without any programmer or
user intervention ?
Do your comments imply that there is an event into which I need to put some
kind of VB instruction to tell VB to commit the data to the mdb file ? If so,
which event and which VB instruction do I issue ?
Waiting for your kind help.
-------
"William Vaughn [MVP]" wrote:
> Ah, VB won't call update on its own. It can't/won't commit the data without
> you telling it to--regardless of the DBMS engine.
>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhikerâs Guide to Visual Studio and SQL Server (7th Edition)
> ____________________________________________________________________________________________
>
> "Ycrl" wrote in message
> news:54157CB6-E2C4-4496-8E1C-7F4D3EBC61A7@microsoft.com...
> > Dear Paul (Mr Clement),
> >
> > Thanks for the link.
> >
> > But:
> > 1) The mdb file is not included in the project, so the 'copy if newer/copy
> > always/never copy' prioperty does not apply to the mdb file.
> > 2) Does the update command have any relevance to the datagrid or to bound
> > controls ? Doesn't vb do the updating automatically ?
> >
> > Is this a bug (in which case it should be easily reproducible) or am I
> > being
> > stupid ?
> > How can I debug or solve this problem ?
> >
> > Thanks in advance for your kind reply.
> >
> > "Paul Clement" wrote:
> >
> >> On Mon, 30 Jun 2008 02:30:01 -0700, Ycrl
> >> wrote:
> >>
> >> ¤ I have created a new form project in vb 2008 express, and added a
> >> data-source
> >> ¤ pointing to a simple mdb file on my local hard drive at C:/DelMe.
> >> ¤
> >> ¤ If I open the data using the database explorer (rather than the
> >> datasource
> >> ¤ explorer) and right click on a table and retrieve the data, then I can
> >> see
> >> ¤ the data and update it from within vb, and changes are actually made to
> >> the
> >> ¤ data in the mdb file.
> >> ¤
> >> ¤ However, if a create either a data grid or bound text boxes which use
> >> the
> >> ¤ datasource and then run the application, changes show up in the
> >> application
> >> ¤ and are seemingly made (ie the datasource is being correctly updated),
> >> but
> >> ¤ these changes are not propagated back to the mdb file.
> >> ¤
> >> ¤ In the datsource explorer, the tableadapter has both fill() and
> >> getdata()
> >> ¤ listed, and the sql for update seems fine (as it does for the select
> >> method
> >> ¤ which works correctly).
> >> ¤
> >> ¤ Why are the changes not being propagated back to the mdb file, and how
> >> can I
> >> ¤ debug this ?
> >>
> >> See if the following applies to your scenario:
> >>
> >> http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=427451&SiteID=1
> >>
> >>
> >> Paul
> >> ~~~~
> >> Microsoft MVP (Visual Basic)
> >>
date: Fri, 4 Jul 2008 03:08:00 -0700
author: Ycrl
Re: Mdb file not updating - VB 2008 Express
With great thanks to Tim Anderson of PCW magazine in the UK, the data only
gets sent back to the mdb file if you run the .update method of the relevant
tableadapter !
This seems strange, as why has Microsoft gone to all the trouble of
automating the Rapid Application Development (RAD) process of having bound
controls and datagrids, whilst still requiring you to use code to commit the
data ? A strange choice. But there it is.
"Ycrl" wrote:
> Now I am completely confused.
>
> I am using databound grids and databound controls. Are those not supposed to
> automatically perform the updates to the mdb file without any programmer or
> user intervention ?
>
> Do your comments imply that there is an event into which I need to put some
> kind of VB instruction to tell VB to commit the data to the mdb file ? If so,
> which event and which VB instruction do I issue ?
>
> Waiting for your kind help.
> -------
>
> "William Vaughn [MVP]" wrote:
>
> > Ah, VB won't call update on its own. It can't/won't commit the data without
> > you telling it to--regardless of the DBMS engine.
> >
> > --
> > __________________________________________________________________________
> > William R. Vaughn
> > President and Founder Beta V Corporation
> > Author, Mentor, Dad, Grandpa
> > Microsoft MVP
> > (425) 556-9205 (Pacific time)
> > Hitchhikerâs Guide to Visual Studio and SQL Server (7th Edition)
> > ____________________________________________________________________________________________
> >
> > "Ycrl" wrote in message
> > news:54157CB6-E2C4-4496-8E1C-7F4D3EBC61A7@microsoft.com...
> > > Dear Paul (Mr Clement),
> > >
> > > Thanks for the link.
> > >
> > > But:
> > > 1) The mdb file is not included in the project, so the 'copy if newer/copy
> > > always/never copy' prioperty does not apply to the mdb file.
> > > 2) Does the update command have any relevance to the datagrid or to bound
> > > controls ? Doesn't vb do the updating automatically ?
> > >
> > > Is this a bug (in which case it should be easily reproducible) or am I
> > > being
> > > stupid ?
> > > How can I debug or solve this problem ?
> > >
> > > Thanks in advance for your kind reply.
> > >
> > > "Paul Clement" wrote:
> > >
> > >> On Mon, 30 Jun 2008 02:30:01 -0700, Ycrl
> > >> wrote:
> > >>
> > >> ¤ I have created a new form project in vb 2008 express, and added a
> > >> data-source
> > >> ¤ pointing to a simple mdb file on my local hard drive at C:/DelMe.
> > >> ¤
> > >> ¤ If I open the data using the database explorer (rather than the
> > >> datasource
> > >> ¤ explorer) and right click on a table and retrieve the data, then I can
> > >> see
> > >> ¤ the data and update it from within vb, and changes are actually made to
> > >> the
> > >> ¤ data in the mdb file.
> > >> ¤
> > >> ¤ However, if a create either a data grid or bound text boxes which use
> > >> the
> > >> ¤ datasource and then run the application, changes show up in the
> > >> application
> > >> ¤ and are seemingly made (ie the datasource is being correctly updated),
> > >> but
> > >> ¤ these changes are not propagated back to the mdb file.
> > >> ¤
> > >> ¤ In the datsource explorer, the tableadapter has both fill() and
> > >> getdata()
> > >> ¤ listed, and the sql for update seems fine (as it does for the select
> > >> method
> > >> ¤ which works correctly).
> > >> ¤
> > >> ¤ Why are the changes not being propagated back to the mdb file, and how
> > >> can I
> > >> ¤ debug this ?
> > >>
> > >> See if the following applies to your scenario:
> > >>
> > >> http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=427451&SiteID=1
> > >>
> > >>
> > >> Paul
> > >> ~~~~
> > >> Microsoft MVP (Visual Basic)
> > >>
date: Mon, 7 Jul 2008 14:24:01 -0700
author: Ycrl
|
|