•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 427,188 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,218 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 26966 | Replies: 3
![]() |
•
•
Join Date: Apr 2004
Posts: 11
Reputation:
Rep Power: 0
Solved Threads: 0
Hi All
I have created a dataset and from this I want to retrieve values of a column into a variable. How can I do this?
This is the code:
Dim sQuery As String = "Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1"
Response.Write(sQuery)
Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter(sQuery, connectionString)
Dim mySet As DataSet = New DataSet
myAdapter.Fill(mySet, "ALC_SECURITY_PERMISSION")
From the above code I need to retrieve all the values of PERMISSION_BUTTON_ID retrieved from the Select statement inot a variable.
Please help
I have created a dataset and from this I want to retrieve values of a column into a variable. How can I do this?
This is the code:
Dim sQuery As String = "Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1"
Response.Write(sQuery)
Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter(sQuery, connectionString)
Dim mySet As DataSet = New DataSet
myAdapter.Fill(mySet, "ALC_SECURITY_PERMISSION")
From the above code I need to retrieve all the values of PERMISSION_BUTTON_ID retrieved from the Select statement inot a variable.
Please help
•
•
Join Date: Apr 2004
Posts: 11
Reputation:
Rep Power: 0
Solved Threads: 0
Ok now what I have done to this is:
Dim sQuery As String = "Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1"
'Response.Write(sQuery)
Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter(sQuery, connectionString)
Dim mySet As DataSet = New DataSet
myAdapter.Fill(mySet, "ALC_SECURITY_PERMISSION")
Dim permID As String
permID = mySet.GetXml.ToString()
But now I am not sure how to retrieve values from this?
Is this a correct approach?
Dim sQuery As String = "Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1"
'Response.Write(sQuery)
Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter(sQuery, connectionString)
Dim mySet As DataSet = New DataSet
myAdapter.Fill(mySet, "ALC_SECURITY_PERMISSION")
Dim permID As String
permID = mySet.GetXml.ToString()
But now I am not sure how to retrieve values from this?
Is this a correct approach?
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I'm not sure this will help, as I'm a beginner at this language myself, but here's code I figured out last night for my program...
What we're doing in this snippet is filling my 'EmployeeData' dataset, setting up a counter to loop through all the records, and putting the value of the column "Seq" into my vSeq variable.
Hope this helped...
da.Fill(EmployeeData)
OleDbConnection1.Close()
Dim row As Data.DataRow
Dim count As Integer = EmployeeData.Rows.Count
Dim i As Integer = 0
For i = 0 To count - 1
'vSeq = EmployeeData.Rows(i).Item("Seq")What we're doing in this snippet is filling my 'EmployeeData' dataset, setting up a counter to loop through all the records, and putting the value of the column "Seq" into my vSeq variable.
Hope this helped...
Last edited by injunraiv : Oct 18th, 2007 at 9:28 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net .net framework 3.0 access asp breach broadband code combo crime custom daniweb data data protection data transfer database drive dropdownlist forensics government hard hardware hitachi internet linux microsoft module net news reuse security skin storage terabyte theme web wikipedia windows workflow
- retrieve data from database into jsp(urgent)!!! (Oracle)
- how to store and retrieve data from cookies (ASP.NET)
- Display data in separate controls (SQL) (VB.NET)
- VB.Net: Problem Retrieve data from ListView (VB.NET)
- How to retrieve data from a dynamically generated radio button (ASP.NET)
- retrieve data by VB.Net (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Audio file
- Next Thread: Search Button..Plz Help


Linear Mode