|
How to filter dataset and update those filtered records
Thanks
|
|
|
|
|
Hi,
We can filter the Data from DataSet as follows..
1. Fetching Filtered Data and Filling to DataSet.
-------------------------------------------------
OleDbDataAdapter1.SelectCommand.Parameters("ACNo").Value = "60891234"
OleDbDataAdapter1.Fill(DataSet11)
2.
Dim FilRows As DataRow() = _
Dset.Tables(0).Select("ACNo='60891234'", "ACHName", DataViewRowState.Added )
Dim r As DataRow
Dim c As DataColumn
For Each r In FilRows
For Each c In r.Table.Columns
Console.Write( "\t {0}", r(c) )
Next c
Console.WriteLine()
Next r
Notes :
-------
"ACNo='60891234'" = Condition for Fintering Data
"ACHName" = Column to Sort The Data.
With Regards,
Pandian S
|
|
|
|
|
Thanks Pandian for ur prompt reply below is my code. Actualy i wanted to modify filted dataview. can u give some suggestion on this.
daConverstion.SelectCommand = scmdConversion
daConverstion.Fill(dsConversion, "Duplicate")
Dim MyDataView As DataView = New DataView(dsConversion.Tables("Duplicate"), "Duplicate_Group_Id=100", "Duplicate_Group_Id", DataViewRowState.CurrentRows)
MyDataView.AllowEdit = True
MyDataView.Item(0).Row(0) = "11"
|
|
|
|
|
I am having a XML file.
I wish to create a class in VB.NET, dynamically.
The name of all properties will be same as tag names in HTML file and value of that property will be value within tags.
Ex. Consider part of XML file as follows.
<name>Kumar
<age>27
.....and so on
Now when I create a class from it,
I should have someting like this
Lets say obj is object os class.
obj.Name
obj.Age
and value of obj.Name should be "Kumar", obj.Age--"27" and so on
Can any one help me out in this case?
Regards,
Amol
Every thing will come to you if you have faith.
|
|
|
|
|
Hi!Everyone!
Connectting millions of dots to a chart.
And how will you store these dot data so that i could open the chart again?
Best Regards
ICQ:258-235-734
MSN:msnadair@hotmail.com
-- modified at 3:22 Monday 17th July, 2006
|
|
|
|
|
There's a bunch of different ways to do this. The best method depends on the performance you want, the size of the file you want, whether you you that data to be editable outsire your app, how you're storing that data internally in your app, ...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i am now storing every dot data item into MS-Access table fields.
each dot data stored in each field.
So it takes a long time when i am storing these dots.
and when i read out the data.
i have thought to store those data by string.But it is so much data that i can't find a data type field of Access datatable.
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
You could create your own dot structure, storing the points in a collection of them. You can then serialize that collection to either a binary file or XML. Binary would definately be smaller, but far less tolerant of changes to the structure.
But, no matter what, since you're storing MILLIONS of points, it'll take a long time to do anything with them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I get it.Thank you
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
i try to build a simple HTML editor using vb dot net,.. but i confuse about how to create a control to preview the html file created or edited,..
i guess i will need a control that has a browser functionality,. i mean render HTML file and also javascript at once,
any idea about this case,.. ? plz share ,..
tears
|
|
|
|
|
Use Internet explorer for this. You will found activeX control of Internet explorer. put it on the preview tab page and on click the tab assign that control with the page you have just designed. so no need of any extra effort to do.
Regards
Rizwan Bashir
|
|
|
|
|
well, acctually my case is not that simple, i really need a control that having a browser functionality. i need to dirrectly preview all html code writen, that's why then im thinking of having such a control in my form,..
any idea ?
tears
|
|
|
|
|
Hi
i want to convert a html file into binary format using VB.
plz help
|
|
|
|
|
|
thank you very much for the help
|
|
|
|
|
harish139 wrote: please help
Everyone is looking for help here. Perhaps a better subject line would be better. For example: "How do I convert HTML"
|
|
|
|
|
Hi guys can you please help me
My problem is i made an parameterise stored procedure (Select Query) i want to use it in vb to show the data of that stored procedure(Select Query)on ListView control using Adodb.RecordSet can any one help me regarding this
My Stored Procedure is as follow on Table1
Procedure Name "Test"
Syntex "Select @PN as PN ,@VA As VA, Table1.*
FROM dbo.Table1"
Parameters are @PA and @VA
i am trying it by using recordset if you have any other idea please give me.
Thanks
Sasmi
|
|
|
|
|
The SELECT statement won't work, if I uderstand what your trying to do. There's isn't enough detail in your question to determine this!
If you're looking to return a record or filtered set of records, it might look something like this
SELECT PN, VA FROM Table1 WHERE PN=@PN AND VA=@VA
If you're looking to return all the data in those two columns in Table1, then no parameters are necessary:
SELECT PN, VA FROM Table1
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i have a windows service in vb.net.
i want to set the property "Allow service to interact with the desktop" through code, instead of doing it manually everytime the service is installed. how can i do that? i have done enough searching on google but haven't found anything relative.
-- modified at 2:12 Monday 17th July, 2006
|
|
|
|
|
You can use WMI and the System.Management namespace to change this. The .NET ServiceInstaller class doesn't support changing this, yet at least. Handle your ServiceInstaller class' Committed event where you can use WMI's Win32_BaseService class to change the DesktopInteract property of the service after it's installed.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
I’m using the following coding for my searching function at listview, but I facing some problem here, if I use this code I only able to search the item at column 0 for the listview. But for my case, I want to let user click on the header of the column then the user only can key in the data for that column they select, what mean is if user click on the column 0 at the header of the listview then user only can search what ever data appear at the column 0 for the listview. As well for column 1, column 2 for the listview. The following coding only allow me to search the data at column 0 even I use the select case for the column click. What mistake I have made? Can anyone give me some advice on this? Thanks.
This is my coding for the searching function at lisview:-
Private Sub ListView_Master_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles ListView_Master.ColumnClick
Dim Search_Code As String
Dim exactMatch As Boolean
Dim mySearchText As String
Select Case e.Column
Case 0 'column one BOM ID
'MsgBox(e.Column)
Case 1 'column two Cust Part # = BOM
MsgBox(e.Column)
mySearchText = Trim(InputBox("Please enter your Customer Part #", "Search Product Master Entry Data"))
'For Each itm As ListViewItem In ListView_Master.Items
For Each itm As ListViewItem In ListView_Master.Items
If exactMatch Then
If itm.Text = mySearchText Then
' an exact match was found ...
MsgBox("Exact")
End If
Else
mySearchText &= "*"
If itm.Text Like mySearchText Then
' a partial match was found ...
MsgBox("Partial")
'ListView_Master.Select()
'ListView_Master.Focus()
End If
End If
Next
Case 2 'column three Child Part#A = CodeAChild Part#B = CodeB
MsgBox(e.Column)
Case 3 'column three Child Part#B = CodeB
MsgBox(e.Column)
End Select
End Sub
|
|
|
|
|
Is there a command that I can use that once I open a text file for input will count the rows in the file?
Right now I'm just using a counter (i += 1) and that works fine but I would think there would be a way to immediately get that rowcount right off the bat. Any ideas, suggestions?
Thanks!
|
|
|
|
|
John Waclawski wrote: but I would think there would be a way to immediately get that rowcount right off the bat
No, there isn't. You have to count the rows yourself, like you already are, or by loading the entire file in a String variable, split it on, or count the number of, CR characters in the string. But this second method can take quite a lot of memory with large text files.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I need to seach to see if something is in an array and i for the life of me cant figure it out
the array i have is :
Dim department As String() = {"PR", "AD", "CI", "GC", "MK", "ED", "FI", "IT", "HR", "DC", "UN"}
What im trying to do is somthing like
for each userrow as datarow
if department.find(userrow"department"),????) = -1 then (not found)
then
UserRow("department") = "UN"
end if
next
but i just cant get the search to work
What im doing now instead
<br />
For Each UserRow As DataRowView In Me.userbindingsource<br />
Select Case UserRow("department").ToString<br />
Case Is = "PR"<br />
Case Is = "AD"<br />
Case Is = "CI"<br />
Case Is = "GC"<br />
Case Is = "MK"<br />
Case Is = "ED"<br />
Case Is = "FI"<br />
Case Is = "IT"<br />
Case Is = "HR"<br />
Case Is = "DC"<br />
Case Is = "UN"<br />
Case Else<br />
MessageBox.Show(UserRow("Name") & " Has An Invalid Department")<br />
UserRow("department") = "UN"<br />
End Select<br />
Next UserRow<br />
-- modified at 16:27 Sunday 16th July, 2006
|
|
|
|
|
You need to use the Array.IndexOf method and pass it the name of the array and the item you wish to find.
To search the department array you provided in your post for, say, "HR", you would do this:
dim i as Integer = Array.IndexOf(department,"HR")
The i variable would then contain the index of the item, or -1 if it was not found.
Hope this helps,
Keith
|
|
|
|