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

manipulating SQL data using VB code but without binding to a datag

I am new to VB .NET: I can configure a SQL adapter and access data via the
datagrid. But how do you access and manipulate data if you do not require the
data to show up on a form. I simply want to audit a SQL table's data using
code to cycle through all records. The user doesn' t need to see the table
data.
Any help appreciated.
Nov 21 '05 #1
3 2068
use can use a dataset to do updates.. or
you can use a regular update statement

"ASzasz" <AS****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
I am new to VB .NET: I can configure a SQL adapter and access data via the
datagrid. But how do you access and manipulate data if you do not require
the
data to show up on a form. I simply want to audit a SQL table's data using
code to cycle through all records. The user doesn' t need to see the table
data.
Any help appreciated.

Nov 21 '05 #2
I didn't explain myself well enough... sorry~ I guess what I am missing is
how to access the data without using a datagrid. Is a data reader the answer?
(I have only just started reading about those) or is there a dataset command
that allows me to access each field in a row from SQL?
"Chris Calzaretta" wrote:
use can use a dataset to do updates.. or
you can use a regular update statement

"ASzasz" <AS****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
I am new to VB .NET: I can configure a SQL adapter and access data via the
datagrid. But how do you access and manipulate data if you do not require
the
data to show up on a form. I simply want to audit a SQL table's data using
code to cycle through all records. The user doesn' t need to see the table
data.
Any help appreciated.


Nov 21 '05 #3
Hi,

You can use code like this (where I open and loop through a dataset's
datatable):

Dim oconn As New SqlConnection("data source=d5z0071;initial
catalog=tennis;integrated security=sspi;")

Dim oda As New SqlDataAdapter("select * from league_t order by league",
oconn)

Dim ods As New DataSet()

oconn.Open()

oda.Fill(ods, "leagues")

Dim irow As DataRow

For Each irow In ods.Tables(0).Rows

messagebox.show(irow("league"))

Next

oconn.Close()

HTH,

Bernie Yaeger

"ASzasz" <AS****@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
I didn't explain myself well enough... sorry~ I guess what I am missing is
how to access the data without using a datagrid. Is a data reader the
answer?
(I have only just started reading about those) or is there a dataset
command
that allows me to access each field in a row from SQL?
"Chris Calzaretta" wrote:
use can use a dataset to do updates.. or
you can use a regular update statement

"ASzasz" <AS****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
>I am new to VB .NET: I can configure a SQL adapter and access data via
>the
> datagrid. But how do you access and manipulate data if you do not
> require
> the
> data to show up on a form. I simply want to audit a SQL table's data
> using
> code to cycle through all records. The user doesn' t need to see the
> table
> data.
> Any help appreciated.


Nov 21 '05 #4

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

Similar topics

2
by: Top Gun | last post by:
Can a DataView be used directly without binding it to another control, such as a DataGrid. I would like to use RowFilter on a DataSet table and extract values from specific columns in rows returned...
3
by: Matt | last post by:
Is there a way to execute server code without doing a complete page refresh in .Net? I have an ASP page to convert that uses XMLHTTP and I'm wondering if I should continue to use it in ASPX or do...
5
by: Ben Fidge | last post by:
Hi, I've had an ASP project dumped on me written in VBScript. I'm actually a C#/ASP.NET developer and am struggling trying to find a way to sort the result of a XPath query executed using...
12
by: David Beoulve | last post by:
In my windows C# app, I create a thread to separate the main code block from the GUI, which recursively sorts through all the directories starting from a given point, and every time it finds a...
7
by: BillE | last post by:
What is the best way to add data using a DataGridView in a multi-tier application (data entry is handled in a data access layer using stored procedures)? Thanks Bill
7
by: ApexData | last post by:
Hello I currently Link the FE/BE using the LinkTables Option and the Linked Table Manager. Any time I need to move the BE to another location, I have to go through this process over again. I...
0
by: DC | last post by:
How can I update data using a Details view without using an AccessDataSource and its associated Insert, Update and Delete but using a DataReader instead?
1
by: sijugeo | last post by:
Hi, What is the c# code for binding the dropdownlist,were the data is from dataset? Thanks, Siju George
2
AR Ratheesh
by: AR Ratheesh | last post by:
Hi Guys, Need help to sent mails using code.i have a table containing 2 fields 1.Name,2.Email ID.and an another table(Data to be attached). Private Sub Command0_Click() On Error GoTo...
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...
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: 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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.