Hi,
I've come a stage that I'm feeling an absolute idiot.
Struggling with this issue for days and can't find a suitable answer.
Have this dataset which 'amount' value can be updated. Need to send all
records with 'amount > 0' to a webservice as a Datatable. (Ignorant as I
might be) I Dim a new DataView (rowfilter 'amount > 0') and copy this into a
new datatable:
dv = New DataView(ds.Tables("Items"), _
"amount > 0", _
"barcode", _
DataViewRowState.CurrentRows)
Dim dt As New DataTable("Result")
dt = dv.Table.Copy
sendDS.Tables.Add(dt)
However, sending this datatable (dt) to a webservice will send the entire
source dataset (= huge)
What am I doing wrong ...
Is there a more suitable way of achieving this!?
Thanks in advance. 3 1245
Hi, Sjaakie Helderhorst,
Maybe you can send a new DataSet containing only the DataTable in question.
Hope this helps
Martin
"Sjaakie Helderhorst" <di*********@hotNOTmail.com> wrote in message
news:ui**************@TK2MSFTNGP09.phx.gbl... Hi,
I've come a stage that I'm feeling an absolute idiot. Struggling with this issue for days and can't find a suitable answer.
Have this dataset which 'amount' value can be updated. Need to send all records with 'amount > 0' to a webservice as a Datatable. (Ignorant as I might be) I Dim a new DataView (rowfilter 'amount > 0') and copy this into
a new datatable:
dv = New DataView(ds.Tables("Items"), _ "amount > 0", _ "barcode", _ DataViewRowState.CurrentRows)
Dim dt As New DataTable("Result") dt = dv.Table.Copy sendDS.Tables.Add(dt)
However, sending this datatable (dt) to a webservice will send the entire source dataset (= huge)
What am I doing wrong ... Is there a more suitable way of achieving this!?
Thanks in advance.
Hi, Sjaakie
You might try the following
sendDS = ds.Clone(
Dim copyRows() As DataRow = ds.Tables("Items").Select("amount > 0"
Dim dt As DataTable = sendDS.Tables("Items"
Dim copyRow As DataRo
For Each copyRow In copyRow
dt.ImportRow(copyRow
Nex
Hope this will help
Bin Song , MC
----- Sjaakie Helderhorst wrote: ----
Hi
I've come a stage that I'm feeling an absolute idiot
Struggling with this issue for days and can't find a suitable answer
Have this dataset which 'amount' value can be updated. Need to send al
records with 'amount > 0' to a webservice as a Datatable. (Ignorant as
might be) I Dim a new DataView (rowfilter 'amount > 0') and copy this into
new datatable
dv = New DataView(ds.Tables("Items"),
"amount > 0",
"barcode",
DataViewRowState.CurrentRows
Dim dt As New DataTable("Result"
dt = dv.Table.Cop
sendDS.Tables.Add(dt
However, sending this datatable (dt) to a webservice will send the entir
source dataset (= huge
What am I doing wrong ..
Is there a more suitable way of achieving this!
Thanks in advance
That did the trick, thanks!
"Bin Song, MCP" <an*******@discussions.microsoft.com> schreef in bericht
news:CF**********************************@microsof t.com... Hi, Sjaakie,
You might try the following:
sendDS = ds.Clone() Dim copyRows() As DataRow = ds.Tables("Items").Select("amount > 0") Dim dt As DataTable = sendDS.Tables("Items") Dim copyRow As DataRow For Each copyRow In copyRows dt.ImportRow(copyRow) Next
Hope this will help,
Bin Song , MCP
----- Sjaakie Helderhorst wrote: -----
Hi,
I've come a stage that I'm feeling an absolute idiot. Struggling with this issue for days and can't find a suitable answer.
Have this dataset which 'amount' value can be updated. Need to send
all records with 'amount > 0' to a webservice as a Datatable. (Ignorant
as I might be) I Dim a new DataView (rowfilter 'amount > 0') and copy this
into a new datatable:
dv = New DataView(ds.Tables("Items"), _ "amount > 0", _ "barcode", _ DataViewRowState.CurrentRows)
Dim dt As New DataTable("Result") dt = dv.Table.Copy sendDS.Tables.Add(dt)
However, sending this datatable (dt) to a webservice will send the
entire source dataset (= huge)
What am I doing wrong ... Is there a more suitable way of achieving this!?
Thanks in advance. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: RPI_alum |
last post by:
I've been experiencing some frustrating behavior that I believe may be a MS bug in the Framework. Has anyone else experienced this, know a better way to resolve it, or if it is an actual MS bug
...
|
by: Raymond Lewallen |
last post by:
I have a dataview in which the sort property will not sort the dataview.
Here's is a simple scenario similar to what I am doing:
Class Foo
Private Function Retrieve() As DataView
' Returns a...
|
by: Peter S. Guild |
last post by:
Hello,
I have a simple routine that uses a dataview to hold information. I need to
sort these columns by section and then by desc. No matter what I do the
dataview will not sort.
What am I...
|
by: Alpha |
last post by:
I have a window application. In one of the form, a datagrid has a dataview
as its datasource. Initial filtering result would give the datavew 3 items.
When I double click on the datagrid to edit...
|
by: Dave Hagerich |
last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being
displayed, using the following code as a test:
DataView theView = new DataView(theDataSet.Tables);
theView.RowFilter =...
|
by: kjvt |
last post by:
Based on a prior posting, I've written a function to convert a
recordset to a dataview. The first call to the function for a given
recordset works perfectly, but the second call always returns a...
|
by: David Wender |
last post by:
I want to create a dataview with a sort on multiple columns. However,
when I use FindRows, I only want to search some of the columns, not
all. Is this possible? I have not been able to make it...
|
by: astro |
last post by:
I have a datagrid that is two levels down from the dataview (i.e.
grandchild). I have spent 3 hours trying to get the syntax of determining
it's real datasource (i.e. not it's source based on it's...
|
by: James |
last post by:
Basically I have a DataGrid that I'm binding to the results of a stored
procedure call. The recordset is fairly small. Initially I'm creating a
DataSet from the results and binding it. There's a...
|
by: randy1200 |
last post by:
I have an orders table. Each record in the orders table contains a customer id.
I have a customer table. The primary key of each record in the customer
table is the customer id.
After getting...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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: 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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
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 ...
| |