473,792 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

retrieve item dataset/dataview

Hello,

I simpy want to place a record ID into a session variable.
I know how to create session variables, I'm just can't figure out the syntax
for the record item when I'm working with a dataset. I'm using vb.

session(session Name) = recordID 'from dataset or dataview

Thanks,
Enrique

Any help appreciated, Thanks
Nov 19 '05 #1
6 1637
EMW
I would use something like:

session(Session Name) =
dataset.tables( "tablename").ro ws(number)("col umnname")

Is this what you meant?
Otherwise could you be more specific?

rg,
Eric
"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:62******** *************** ***********@mic rosoft.com...
Hello,

I simpy want to place a record ID into a session variable.
I know how to create session variables, I'm just can't figure out the
syntax
for the record item when I'm working with a dataset. I'm using vb.

session(session Name) = recordID 'from dataset or dataview

Thanks,
Enrique

Any help appreciated, Thanks

Nov 19 '05 #2
Thank you for the reply, Eric

Ok, this is what I want to do,
grab the "ID" of a record from a dataset that is filtered with a dataview.

-------------------------------------
DataAdapter.Fil l(DataSetX)
DataView.RowFil ter = "recordXID = 150" 'this returns one record/row
session("Sessio nName") = recordYID 'an item from the DataView
-------------------------------------

What you gave me seems close to what I need.
Your example retrieves the row specified ie. row(0) returns the first row.
I need to dynamically retrieve the row from the filtered dataview.
I have half a brain, right now, so hopefully I'm making sense.

Regards,
enrique


"EMW" wrote:
I would use something like:

session(Session Name) =
dataset.tables( "tablename").ro ws(number)("col umnname")

Is this what you meant?
Otherwise could you be more specific?

rg,
Eric
"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:62******** *************** ***********@mic rosoft.com...
Hello,

I simpy want to place a record ID into a session variable.
I know how to create session variables, I'm just can't figure out the
syntax
for the record item when I'm working with a dataset. I'm using vb.

session(session Name) = recordID 'from dataset or dataview

Thanks,
Enrique

Any help appreciated, Thanks


Nov 19 '05 #3
Thank you for the reply, Eric

Ok, this is what I want to do,
grab the "ID" of a record from a dataset that is filtered with a dataview.

-------------------------------------
DataAdapter.Fil l(DataSetX)
DataView.RowFil ter = "recordXID = 150" 'this returns one record/row
session("Sessio nName") = recordYID 'an item from the DataView
-------------------------------------

What you gave me seems close to what I need.
Your example retrieves the row specified ie. row(0) returns the first row.
I need to dynamically retrieve the row from the filtered dataview.
I have half a brain, right now, so hopefully I'm making sense.

Regards,
enrique


"EMW" wrote:
I would use something like:

session(Session Name) =
dataset.tables( "tablename").ro ws(number)("col umnname")

Is this what you meant?
Otherwise could you be more specific?

rg,
Eric
"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:62******** *************** ***********@mic rosoft.com...
Hello,

I simpy want to place a record ID into a session variable.
I know how to create session variables, I'm just can't figure out the
syntax
for the record item when I'm working with a dataset. I'm using vb.

session(session Name) = recordID 'from dataset or dataview

Thanks,
Enrique

Any help appreciated, Thanks


Nov 19 '05 #4
EMW
Just this week I found out that if you use DataViewRow you can read the row
in the order of the filtered and sorted dataview.

dim dvr as dataviewrow

dvr = dataview(record number)

then

dvr(column1) = something
dvr(column2) = something
etc..

Hope this helps...

rg,
Eric

"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:67******** *************** ***********@mic rosoft.com...
Thank you for the reply, Eric

Ok, this is what I want to do,
grab the "ID" of a record from a dataset that is filtered with a dataview.

-------------------------------------
DataAdapter.Fil l(DataSetX)
DataView.RowFil ter = "recordXID = 150" 'this returns one record/row
session("Sessio nName") = recordYID 'an item from the DataView
-------------------------------------

What you gave me seems close to what I need.
Your example retrieves the row specified ie. row(0) returns the first row.
I need to dynamically retrieve the row from the filtered dataview.
I have half a brain, right now, so hopefully I'm making sense.

Regards,
enrique


"EMW" wrote:
I would use something like:

session(Session Name) =
dataset.tables( "tablename").ro ws(number)("col umnname")

Is this what you meant?
Otherwise could you be more specific?

rg,
Eric
"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:62******** *************** ***********@mic rosoft.com...
> Hello,
>
> I simpy want to place a record ID into a session variable.
> I know how to create session variables, I'm just can't figure out the
> syntax
> for the record item when I'm working with a dataset. I'm using vb.
>
> session(session Name) = recordID 'from dataset or dataview
>
> Thanks,
> Enrique
>
> Any help appreciated, Thanks
>
>


Nov 19 '05 #5
It helped greatly!

Although it worked as DataRowView as opposed to "dataviewro w" :)

my working code:
----------------------------
Dim xID As Int32
Dim yID As Int32
Dim dvr As DataRowView

'//// Filter DataRow
dvr = dvwShows(0)
xID = dvr(0)
yID = dvr(1)
----------------------------

You're a good man, Thanks!

-Enrique

"EMW" wrote:
Just this week I found out that if you use DataViewRow you can read the row
in the order of the filtered and sorted dataview.

dim dvr as dataviewrow

dvr = dataview(record number)

then

dvr(column1) = something
dvr(column2) = something
etc..

Hope this helps...

rg,
Eric

"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:67******** *************** ***********@mic rosoft.com...
Thank you for the reply, Eric

Ok, this is what I want to do,
grab the "ID" of a record from a dataset that is filtered with a dataview.

-------------------------------------
DataAdapter.Fil l(DataSetX)
DataView.RowFil ter = "recordXID = 150" 'this returns one record/row
session("Sessio nName") = recordYID 'an item from the DataView
-------------------------------------

What you gave me seems close to what I need.
Your example retrieves the row specified ie. row(0) returns the first row.
I need to dynamically retrieve the row from the filtered dataview.
I have half a brain, right now, so hopefully I'm making sense.

Regards,
enrique


"EMW" wrote:
I would use something like:

session(Session Name) =
dataset.tables( "tablename").ro ws(number)("col umnname")

Is this what you meant?
Otherwise could you be more specific?

rg,
Eric
"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:62******** *************** ***********@mic rosoft.com...
> Hello,
>
> I simpy want to place a record ID into a session variable.
> I know how to create session variables, I'm just can't figure out the
> syntax
> for the record item when I'm working with a dataset. I'm using vb.
>
> session(session Name) = recordID 'from dataset or dataview
>
> Thanks,
> Enrique
>
> Any help appreciated, Thanks
>
>


Nov 19 '05 #6
EMW
I wrote the example out of my head and since my brain is aways busy working
out coding problems and developing new ideas even before one line of code is
written, you can imagin why I got it wrong.. ;-)

rg,
Eric

"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:68******** *************** ***********@mic rosoft.com...
It helped greatly!

Although it worked as DataRowView as opposed to "dataviewro w" :)

my working code:
----------------------------
Dim xID As Int32
Dim yID As Int32
Dim dvr As DataRowView

'//// Filter DataRow
dvr = dvwShows(0)
xID = dvr(0)
yID = dvr(1)
----------------------------

You're a good man, Thanks!

-Enrique

"EMW" wrote:
Just this week I found out that if you use DataViewRow you can read the
row
in the order of the filtered and sorted dataview.

dim dvr as dataviewrow

dvr = dataview(record number)

then

dvr(column1) = something
dvr(column2) = something
etc..

Hope this helps...

rg,
Eric

"enrique" <en*****@discus sions.microsoft .com> schreef in bericht
news:67******** *************** ***********@mic rosoft.com...
> Thank you for the reply, Eric
>
> Ok, this is what I want to do,
> grab the "ID" of a record from a dataset that is filtered with a
> dataview.
>
> -------------------------------------
> DataAdapter.Fil l(DataSetX)
> DataView.RowFil ter = "recordXID = 150" 'this returns one record/row
> session("Sessio nName") = recordYID 'an item from the DataView
> -------------------------------------
>
> What you gave me seems close to what I need.
> Your example retrieves the row specified ie. row(0) returns the first
> row.
> I need to dynamically retrieve the row from the filtered dataview.
> I have half a brain, right now, so hopefully I'm making sense.
>
> Regards,
> enrique
>
>
>
>
> "EMW" wrote:
>
>> I would use something like:
>>
>> session(Session Name) =
>> dataset.tables( "tablename").ro ws(number)("col umnname")
>>
>> Is this what you meant?
>> Otherwise could you be more specific?
>>
>> rg,
>> Eric
>>
>>
>> "enrique" <en*****@discus sions.microsoft .com> schreef in bericht
>> news:62******** *************** ***********@mic rosoft.com...
>> > Hello,
>> >
>> > I simpy want to place a record ID into a session variable.
>> > I know how to create session variables, I'm just can't figure out
>> > the
>> > syntax
>> > for the record item when I'm working with a dataset. I'm using vb.
>> >
>> > session(session Name) = recordID 'from dataset or dataview
>> >
>> > Thanks,
>> > Enrique
>> >
>> > Any help appreciated, Thanks
>> >
>> >
>>
>>
>>


Nov 19 '05 #7

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

Similar topics

2
2262
by: Thomas | last post by:
Hi, I used xsd.exe to generate a *.xsd file from the *.xml-File and then I created a typed DataSet in VisualStudio 2003 But now I have problems to read the data from the DataSet. <?xml version="1.0" encoding="UTF-8"?> <Message id="100199" version="1.9" something="1"> <Jobs id="999" priority="0">
1
6515
by: Linda | last post by:
Hi, I'm new to asp.net and tryign to learn how to work with data grids. I'm retrieving data from a stored procedure and putting it in a data grid. I then want to be able to sort the data when clicking on the headers, using the Sub grdList_SortCommand. When clicking a header I get the error message: "System.Data.DataException: DataTable must be set prior to using DataView."
17
2771
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only allow user to filter the first time, when they tried the second time, the speficied cast error message will prompt one.... I create a mydataset1 first, and the mydataset1 data source was getting from DataGrid.DataSource.
9
4463
by: Kay | last post by:
Hi all, Could you tell me the best way to add a blank item(as first item) in a data binded combo box? Because I think I didn't do it right and it generate an error if the second item(after the top blank item) is selected by using Combo.SelectedValue : "Specified argument was out of the range of valid values. Parameter name: '-2147483648' is not a valid value for 'index'.
3
32279
by: Rich | last post by:
Hello, I am populating a datagridview from a datatable and filtering the number of rows with a dataview object. Is there a way to retrieve the rows displayed by the datagridview into a separate datatable without having to loop through each column in the datagridview? Or is there a way to retrieve the rows from the original datatable filtered by the dataview into a separate table? I only want to copy the rows from the main table that...
5
3938
by: Earl | last post by:
Noting first that I'm coming from VS2003 and VB.Net ... Using an untyped dataset, I create a dataview. When I try to use the Item property, "Item" does not appear on the Intellisense dropdown and I also get the build error "'System.Data.DataView' does not containt a definition for 'Item'." The documentation for VS2005 does show Item as a property of a dataview -- can anyone see the issue? DataView dvContacts = new DataView(ds.Tables);...
3
6426
by: Elmo Watson | last post by:
I previously had a project working, in which the Gridview was populated by a DataSet - then, with a DropDownlist in one of the columns, using the OnrowDataBound event, to populate the DDL with the correct item in the returned data, I had : myDDL.SelectedValue = IIf(IsDBNull(MyDataSet.Rows(e.Row.RowIndex).Item("Fieldname")), vbNullString, MyDataSet.Rows(e.Row.RowIndex).Item("Fieldname")) In my new application, I'm using a DataView to...
11
2528
by: Sid Price | last post by:
I have Dataset that I need to filter into another Dataset for display and I can not find out how to do this. I have found methods for copying a Dataset but I can not see how to filter the rows copied using my query. I hoped to be able to use a DataAdaptor to do this but SelectCommand requires a connection and I don't see how to create a connection to my Dataset object. Any pointers would be much appreciated. Sid.
9
4793
by: Mel | last post by:
I have 10 columns total. 3 of them are invisible. The rest are read- only BoundFields, 3 of which are editable fields using TemplateFields. Upon editing, I want to validate what the user enters against one of those invisible columns. How do I accomplish this? The code below that I attempted just returns an empty string when I try to retrieve the invisible column data: gvParts.Rows(e.RowIndex).Cells(8).Text
0
9670
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10159
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2917
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.