Re: datagrid updating from join to single table
From: SomeoneKnows (SomeoneKnows_at_discussions.microsoft.com)
Date: 01/18/05
- Next message: Hugh Smith: "VB6/ADO/OLE DB/JET"
- Previous message: Brendan Reynolds: "Re: ADO/ALTER TABLE problem"
- In reply to: Mark J. McGinty: "Re: datagrid updating from join to single table"
- Next in thread: Mark J. McGinty: "Re: datagrid updating from join to single table"
- Reply: Mark J. McGinty: "Re: datagrid updating from join to single table"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 05:33:11 -0800
Mark,
That sounds like what I need. Yes, I would like an example if you could send
me one, that would help. I understand about building classes but I've had
some trouble getting the DataBindingBehavior, DataSourceBehavior, and this
issue of binding data to a class working properly.
Thanks,
Vince Thompson
vince.thompson@cinbell.com
"Mark J. McGinty" wrote:
> You need to create your own custom data class or user control. (The main
> difference between them is you can bind items on your form graphically, just
> as you do with ADODC.) You will then have control of the recordset that
> underlies the data source object.
>
> You then expose your own AddNew method (as well as others that
> ADODB.Recordset supports) and code as you wish. You can declare the
> recordset With Events (and connection too, if it suits your purposes) and
> then handle relevant events.
>
> It's an almost infinitely more flexible solution than ADODC. I have an
> example if you're interested.
>
>
> -Mark
>
>
> "SomeoneKnows" <SomeoneKnows@discussions.microsoft.com> wrote in message
> news:4FCE1A3C-C0C2-4355-8284-E9E6D6DBA396@microsoft.com...
> >I have a legacy program written in VB6 that I have to update. The program
> >is
> > using a datagrid and ADODC control as it's datasource. The program was
> > using
> > a single table viewed in the datagrid but I must change it to display data
> > from two tables. One table will contain the changing data while the other
> > table is used to display constant (unit_price, etc.) information. When the
> > user enters or modifies data it should modify data in only one of the
> > tables.
> > My select statement is working to display the proper data but inserting a
> > record in the datagrid causes the program to appear to try adding records
> > to
> > both tables instead on only one. FYI, the client's database this program
> > connects to is Oracle.
> >
> > How do I intercept the insert/update procedures to effect only one of the
> > tables? Is there a way to form a SQL statement in the
> > Datagrid1_BeforeUpdate
> > event which overrides the adodc control? Is there some other event I
> > should
> > be looking at or another way to cause the updates to go to only one of the
> > tables?
>
>
>
- Next message: Hugh Smith: "VB6/ADO/OLE DB/JET"
- Previous message: Brendan Reynolds: "Re: ADO/ALTER TABLE problem"
- In reply to: Mark J. McGinty: "Re: datagrid updating from join to single table"
- Next in thread: Mark J. McGinty: "Re: datagrid updating from join to single table"
- Reply: Mark J. McGinty: "Re: datagrid updating from join to single table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|