473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

passing a variable from one form to anothers dataset

hcs
Hello,

i have a form which has a datagrid and another which displays some
information. what i would like is to be able to double click a row on the
datagrid on form B and then display the select record on form A. i am using
ado.net to an access database and using oledbdataAdapter,oldbconnection and
datasets. so what i need to do is to change the dataset on Form A to only
show the record with an ID that has been selected on Form B.

Today is the second day that i have been getting into VB.net, i have used
vb6 for a long time now. i am presently trying to convert a few simple
application into vb.net so i can get used to it. in some areas it is very
similarly but in others it is miles apart and looking through google doesn't
seem to be answering my questions!

Thanks for all the help everyone has gave me so far!
Nov 21 '05 #1
2 1202
You can make the DataSet a Shared property or store it in a module - this
will let you access it throughout the entire project. Now, you have a few
methods to show just one record - but you can use DataTable.Select or use
a DataView for isntance, and set the Rowfilter property to match only the
row of that selected row in the grid.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"hcs" <a@a.co.uk> wrote in message
news:Oy**************@TK2MSFTNGP10.phx.gbl...
Hello,

i have a form which has a datagrid and another which displays some
information. what i would like is to be able to double click a row on the
datagrid on form B and then display the select record on form A. i am using ado.net to an access database and using oledbdataAdapter,oldbconnection and datasets. so what i need to do is to change the dataset on Form A to only
show the record with an ID that has been selected on Form B.

Today is the second day that i have been getting into VB.net, i have used
vb6 for a long time now. i am presently trying to convert a few simple
application into vb.net so i can get used to it. in some areas it is very
similarly but in others it is miles apart and looking through google doesn't seem to be answering my questions!

Thanks for all the help everyone has gave me so far!

Nov 21 '05 #2
hcs
Thanks that solved it! just shared the dataset. could you explain the
datatable.select please? i don't get how you use that

thanks for all your help
"W.G. Ryan eMVP" <Wi*********@gmail.com> wrote in message
news:uH**************@TK2MSFTNGP09.phx.gbl...
You can make the DataSet a Shared property or store it in a module - this
will let you access it throughout the entire project. Now, you have a few
methods to show just one record - but you can use DataTable.Select or use
a DataView for isntance, and set the Rowfilter property to match only the
row of that selected row in the grid.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"hcs" <a@a.co.uk> wrote in message
news:Oy**************@TK2MSFTNGP10.phx.gbl...
Hello,

i have a form which has a datagrid and another which displays some
information. what i would like is to be able to double click a row on the
datagrid on form B and then display the select record on form A. i am

using
ado.net to an access database and using oledbdataAdapter,oldbconnection

and
datasets. so what i need to do is to change the dataset on Form A to only
show the record with an ID that has been selected on Form B.

Today is the second day that i have been getting into VB.net, i have used
vb6 for a long time now. i am presently trying to convert a few simple
application into vb.net so i can get used to it. in some areas it is very
similarly but in others it is miles apart and looking through google

doesn't
seem to be answering my questions!

Thanks for all the help everyone has gave me so far!


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Cantekin Guneser | last post by:
i am new to windows aplication, i am planning to desing a program which has login form. i want to use in formation at second form which i used in login form. ex: i filled a dataset in login form...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
3
by: JJ | last post by:
Hi, I need to pass a dataset to another win form along with a SqldataAdapter. I don't want to recreate the SqlDataAdapter again either. So to pass to another Win form in my windows form app, do...
6
by: Brian Henry | last post by:
What is the best way to pass a data set between objects? I have a custom control which will depend on a dataset (kind of like a bound contorl, but im handleing it differently) is it best to pass as...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
5
by: Darious Snell | last post by:
I am using windows forms and vb.net. My problem is a little complex so please bear with me. I have written an application that references a .com based API linked to an external client...
5
by: Sridhar | last post by:
Hi, I have created a web application. I have a data access dll to interact with database. I added this dll as a reference to the web application. Now let's say if I am calling a function in data...
0
by: Magnus Bergh | last post by:
I am developing an application for pocketpc and this involvs a but of juggling with different forms. I have an "order entry" type of application. On the main form I have a grid which displays...
4
by: John Sheppard | last post by:
Hello there I was wondering if anyone could help me, I am trying to pass a typed dataset to a dialoged child form by reference. I have binding sources sitting on the child form. So to refresh...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.