Shawn & Bob,

Thanks for the tips, got time this weekend to investigate and get them
working...great stuff!


Jeffrey A. Block
Sr. Systems Analyst
The Timken Company
Phone: (330) 471-3268
Email: [EMAIL PROTECTED]

 -----Original Message-----
From:   Shawn Wildermuth [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 10, 2002 5:56 PM
To:     [EMAIL PROTECTED]
Subject:        Re: [DOTNET] CommandBuilder Problems

MSDN has a number of them.  Look at for Optimistic Concurrency in the
index.  For performance intensive work, rolling your own commands is
better in the long run.

Thanks,

Shawn Wildermuth
[EMAIL PROTECTED]

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> On Behalf Of Block, Jeffrey A.
> Sent: Wednesday, April 10, 2002 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] CommandBuilder Problems
>
>
> I see...thanks for the information.  Do you have any leads on
> some samples of providing your own command objects and
> populating the parameters?
>
> Jeff Block
>
>
> -----Original Message-----
> From: Shawn Wildermuth [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 10, 2002 3:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] CommandBuilder Problems
>
> Nope, the COmmandBuilder (if I remember correctly) registers
> for certain events and creates the statements on the fly.
>
> Thanks,
>
> Shawn Wildermuth
> [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> > On Behalf Of Block, Jeffrey A.
> > Sent: Wednesday, April 10, 2002 7:43 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [DOTNET] CommandBuilder Problems
> >
> >
> > Hmmm...no, the DataAdaptor and CommandBuilder are scoped at
> the same
> > level, but this raises an interesting question. When I pass
> an adaptor
> > to the CommandBuilder in the constructor like I am, I guess I was
> > assuming that the commands were added to the adaptor for me.  (At
> > least, this is what *seemed* to be happening in the
> past...)  So, even
> > if the CommandBuilder goes out of scope, wouldn't the command
> > objects still be valid references and not gc'd?
> >
> >
> > I don't think that I want to use the CommandBuilder long
> term, but am
> > confused on rolling my own.  How do the parameters get
> > populated/assigned to your own command in a batch-like
> update?  Or is
> > this not possible and you have to loop through the changed records,
> > call the appropriate command and pass or assign the
> parameter values?
> > Hopefully, this is not the case and I am just missing
> something...  I
> > looked on gotdotnet, etc. but couldn't find any examples of
> > rolling you own commands for the DataAdaptor.  Any
> > suggestions anyone?  Thanks in advance...
> >
> > Jeff Block
> >
> > -----Original Message-----
> > From: Shawn Wildermuth [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 09, 2002 7:17 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [DOTNET] CommandBuilder Problems
> >
> > Any chance your CommandBuilder is going out of scope and being GC'd
> > before you need it?
> >
> > Thanks,
> >
> > Shawn Wildermuth
> > [EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> > > On Behalf Of Jeff Block
> > > Sent: Tuesday, April 09, 2002 4:12 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [DOTNET] CommandBuilder Problems
> > >
> > >
> > > I am using the CommandBuilder to create the insert, update
> > and delete
> > > commands for a DataAdaptor as follows:
> > >
> > > protected System.Data.SqlClient.SqlDataAdapter adaptor; protected
> > > System.Data.SqlClient.SqlCommandBuilder cb; adaptor = new
> > > System.Data.SqlClient.SqlDataAdapter(string.Format ( "SELECT
> > > * FROM {0}", classDef.DatabaseTableName ), new
> > > System.Data.SqlClient.SqlConnection(ss.ConnectionString()
> )); cb =
> > > new System.Data.SqlClient.SqlCommandBuilder ( adaptor );
> > >
> > > (sorry for the formatting...).  The code used to work,
> but now the
> > > commands are all null.  The adaptor.Fill works fine, so the
> > connection
> > > string, etc. seem okay, but all other commands fail becuase
> > > CommandBuilder does not create the SqlCommands!  Any help is
> > > appreciated...
> > >
> > > Confused,
> > >
> > > Jeff
> > >
> > > You can read messages from the DOTNET archive, unsubscribe from
> > > DOTNET, or subscribe to other DevelopMentor lists at
> > > http://discuss.develop.com.
> > >
> >
> > You can read messages from the DOTNET archive, unsubscribe from
> > DOTNET, or subscribe to other DevelopMentor lists at
> > http://discuss.develop.com.
> >
> >
> >
> >
> **********************************************************************
> > This message and any attachments are intended for the individual or
> > entity named above. If you are not the intended recipient,
> please do
> > not forward, copy, print,  use or disclose this communication to
> > others; also please notify the sender by replying to this
> message, and
> > then delete it from your system.
> >
> > The Timken Company
> >
> **********************************************************************
> >
> > You can read messages from the DOTNET archive, unsubscribe from
> > DOTNET, or subscribe to other DevelopMentor lists at
> > http://discuss.develop.com.
> >
>
> You can read messages from the DOTNET archive, unsubscribe
> from DOTNET, or subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
> You can read messages from the
> DOTNET archive, unsubscribe from DOTNET, or subscribe to
> other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to