473,386 Members | 1,694 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,386 software developers and data experts.

Dataset help

Shanaj
51
Please help me how to retrieve data from dataset to a textbox
Feb 5 '07 #1
2 1077
shweta123
692 Expert 512MB
Hi,

Dim constr as string
Dim ds as new dataset
Dim comm as oledb.OleDbCommand
Dim da as oldb.oldbDataAdapter
Dim con as new Oldb.OledbConnection

'Open a connection
constr=""Provider=SQLOLEDB.1;Persist Security Info=False;................."
con.connectionstring=constr
con.open constr

'Fill Dataset
sql="select * from....................."
da=new oledb.OledbDataAdapter(sql,con)
da.Fill(ds)

'Open dataset
'e.g first row first column
Textbox.text=ds.Tables(0).Rows(0).Item(0)

Hope this helps
Shweta
Feb 5 '07 #2
Shanaj
51
Hi,

Dim constr as string
Dim ds as new dataset
Dim comm as oledb.OleDbCommand
Dim da as oldb.oldbDataAdapter
Dim con as new Oldb.OledbConnection

'Open a connection
constr=""Provider=SQLOLEDB.1;Persist Security Info=False;................."
con.connectionstring=constr
con.open constr

'Fill Dataset
sql="select * from....................."
da=new oledb.OledbDataAdapter(sql,con)
da.Fill(ds)

'Open dataset
'e.g first row first column
Textbox.text=ds.Tables(0).Rows(0).Item(0)

Hope this helps
Shweta


Thanks for Replay
Feb 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
4
by: suzy | last post by:
hello. how can i sort data in a dataset? all the examples i have seen on msdn, etc are sorting a dataview. this works fine, but i want to return the results in xml and the dataview doesn't...
35
by: MuZZy | last post by:
Hi All, I got a issue here and hope someone can help me: Let's consider this code: // =================== CODE START ================================= using System; using System.Data; ...
4
by: Brian Keating | last post by:
wonder if anyone can help me here, i've a framework 1.1 dataset which i serialize in framework 1.1 and deserialize in framework 2.0. This is fine, problem is that i want to modify some of the...
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
12
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
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...
3
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and...
6
by: Ramakrishnan Nagarajan | last post by:
Hi can any one help me in converting a DataView into a DataSet or a DataTable into a DataSet, I tried the following ways dSet= ((DataSet)_gridRegStudDetails.DataSource); dSet =...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.