Click here to Skip to main content
16,005,162 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Authentication code Pin
FrankyT29-May-06 7:38
FrankyT29-May-06 7:38 
QuestionOutlook Add-In [modified] Pin
Malik Nasir28-May-06 23:53
Malik Nasir28-May-06 23:53 
QuestionHow do I wait For a Web Transction to complete? [modified] Pin
FrankyT28-May-06 21:06
FrankyT28-May-06 21:06 
AnswerRe: How do I wait For a Web Transction to complete? [modified] Pin
Leeland29-May-06 5:12
Leeland29-May-06 5:12 
QuestionHow to properly add records to a database through formatted databound textboxes Pin
JDFA28-May-06 9:23
JDFA28-May-06 9:23 
AnswerRe: How to properly add records to a database through formatted databound textboxes Pin
FrankyT28-May-06 21:34
FrankyT28-May-06 21:34 
GeneralRe: How to properly add records to a database through formatted databound textboxes Pin
JDFA29-May-06 11:08
JDFA29-May-06 11:08 
GeneralRe: How to properly add records to a database through formatted databound textboxes Pin
FrankyT2-Jun-06 16:02
FrankyT2-Jun-06 16:02 
Look into Parse and Format.
You use those to modify the on the data in and the out for presentation and storage.
IE: you have a DB that some yahoo created a collumn with "y","Y","n", and "n" in it.
you want to bind it to a checkbox. if the feild was a bit/Boolean, you could directly bind it with the datasource property or by using
me.checkbox.databindings.add(new binding(me.dataset1.<tablename>, "<feildname>", "Checked <or any="" other="" bindable="" property="">"))
...or somthing a lot like that.

as an aside You can do really neat things with lookup tables and comboboxes with this command by binding the display(human readable text feild) and value(the pk feild) members oif the combobox to teh lookup table, and then binding the selectedvalue property to teh real datatables fk feild into the lookup table.

I can't quote you the code to parse (to morph data from the UI to fit the database) and format(for the data coming out of the dataset into the UI), 'casuse I design my databases with some forthought, but basically you create events for the feild parse and format, and within those, you mutate back and forth.

Below are some assorted ramblings with a tip or two buried within them, mainly on binding context and currencymanagers. it isn't directly in your question but if you like check it out.

within your binding context are all your datasiource objects (datasets, dataviews, and datatables) each instance of which has a currency manager that points to and iterates through the datarows within. Currency managers are Great but theres a gotcha. you only get one per instance of a datasourceobject. thats Why I create dataviews to show the datatables in my datasets when I'm binding them. also no more than one control can be bound to a feild on a particular datasourceobject. but you can have multible views sitting atop the same datatable and bind two controls to the same feild but on the other view.


AS a result I always get my currency managers by using
dim thing as CurrencyManager = ctype(me.bindingcontext("<datasourceobject>"),currencymanger)
whenever I need one (and you can just use the whole expression instead of )

Now there are some advanced members to this lib that intellisense won't point out to you by default. I recomend that you disable "Hide Advanced Members" in teht Visual Studio options. My favorite is
ctype(me.bindingcontext("<datasourceobject>"),currencymanger).current.row("<feildname>")
to access the value in a row. not nesecarily the best form but it gets the job done.


have fun,
Frank












hey...slang is the vernacular for the vernacular...wow
Questionhow to disable only close buuton Pin
iramg28-May-06 9:21
iramg28-May-06 9:21 
AnswerRe: how to disable only close buuton Pin
Roy Heil28-May-06 11:26
professionalRoy Heil28-May-06 11:26 
AnswerRe: how to disable only close buuton Pin
Tamimi - Code28-May-06 19:38
Tamimi - Code28-May-06 19:38 
QuestionWorking with dates Pin
MichMar28-May-06 6:24
MichMar28-May-06 6:24 
AnswerRe: Working with dates Pin
HaloZa28-May-06 8:29
HaloZa28-May-06 8:29 
AnswerRe: Working with dates Pin
Guerven29-May-06 18:21
Guerven29-May-06 18:21 
QuestionHow can I tarnish a color? Pin
Niamorh28-May-06 5:34
Niamorh28-May-06 5:34 
AnswerRe: How can I tarnish a color? Pin
Christian Graus28-May-06 11:10
protectorChristian Graus28-May-06 11:10 
GeneralRe: How can I tarnish a color? Pin
Niamorh28-May-06 11:28
Niamorh28-May-06 11:28 
GeneralRe: How can I tarnish a color? Pin
Christian Graus28-May-06 11:33
protectorChristian Graus28-May-06 11:33 
GeneralRe: How can I tarnish a color? Pin
Niamorh28-May-06 11:49
Niamorh28-May-06 11:49 
QuestionQuestion about put window on top off all other windows. Pin
Yanshof27-May-06 18:42
Yanshof27-May-06 18:42 
AnswerRe: Question about put window on top off all other windows. Pin
kumarprabhakar7428-May-06 18:52
kumarprabhakar7428-May-06 18:52 
QuestionAdd Click Event to Task Pane Item Pin
UBigDummie27-May-06 18:41
UBigDummie27-May-06 18:41 
QuestionMultithreading Problem Pin
sujanakar27-May-06 18:31
sujanakar27-May-06 18:31 
AnswerRe: Multithreading Problem Pin
arcticbrew28-May-06 9:24
arcticbrew28-May-06 9:24 
GeneralRe: Multithreading Problem Pin
sujanakar31-May-06 17:59
sujanakar31-May-06 17:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.