Refresh update, select, and insert command parameter lengths in a dataadapter...

  • Thread starter Thread starter Hyper X
  • Start date Start date
H

Hyper X

Hey guys,

I have this column 'ShipmentEmail'. Its 80 characters... So, all the
ins, upd, and sel commands have this parameter with length 80 chars.

The user says 'Bump the length of this field up dammit...', so I go and
change it to 255 in the DB. That goes fine without any incidents.

Now, the parameters in the sel, ins, and upd commands still have the old
length of 80. How do I ask it to refresh the length of the parameters
whenever you do an ins, upd, or sel??

Thanks for the help.

HyperX.
 
You may want to use the DeriveParameters method of the CommandBuilder - you
can also check out the Microsoft Data Access Application Block which will
handle this for you.
 
Cor,

Can you please expand on what you said? I could not understand.

Thanks,

HyperX.
 
It is very simple, Bill has always avoided the commandbuilder and shortley
ago I asked why it was in simple situations because I have read very good
things about it in these newsgroups and he still gave an answer not to use
it.

So I was supprised he recommended it now.

However he did not give a reaction as you see.

Cor
 
I think Bill was saying the CommandBuilder can be useful in some scenarios.
In particular when it doesn't actually build commands for you :) You can
use CommandBuilder to derive parameters for a command, and the MS data access
block does this with caching to avoid double round trips.
 
Unfortunately, the method in Data Access App Block works only for Stored
procedures. Does any one know any way to refresh the parameters for
non-SP commands?

Thanks,

HyperX.
 
Back
Top