VS 2008 Loop Collecting Data?
Apr 13, 2009I am making a webrequest to a web page, and need to collect some data which is arranged like:
<tr bgcolor="#ffffff" class="text" height=10>
<td>Name1</td>
<td>Age1</td>
[Code]...
I am making a webrequest to a web page, and need to collect some data which is arranged like:
<tr bgcolor="#ffffff" class="text" height=10>
<td>Name1</td>
<td>Age1</td>
[Code]...
I am trying to get the numbers from a text field .the format of the text field is ##d##+## (number sighs represent actual numbers)[code]....
View 1 RepliesPretty basic question, I have a checkboxlist inside of a wizard control. I need to collect the value of all items that are checked, as well as whatever value is inside of a textbox if "other" is checked, to insert into my database during the Wizard.FinishButtonClick event. How do I do this?
View 1 RepliesHow can I collect details regarding the hardware and software, of a PC ?As for registration process of the product (my app), I wish to collect the details of that PC and get it saved into my server.When the client request for a new serial key, because of formatting the PC and other reasons, I would compare the PC details and will issue a new serial key based on the result. (small changes in the PC will not be considered)
View 4 RepliesI have used list views for a project. I have used sum items on the items. The sub items are prices of products. I will need to use these sub items to come up with a total.Also, i have used to listviews, for a smoother look and feel. You click the product which then is removed from the list view and added to the second one. Would this also "move" the sub item across to the other list view?
View 1 RepliesI have an Access database that has thousands of records. The fields in the database are EMPID, FIRST, LAST, JOBTYPE and PAGES. I would like to know how to loop through the data table and for each individual EMPID to calculate the sum of the PAGES for each JOBTYPE.There are four JOBTYPE's: "E", "K", "O" and "R".Here is some
Dim WebAllEmployeeQuery As String = _
"SELECT ELPallEmployees.[EMPID], ELPallEmployees.[FIRST], ELPallEmployees.[Last], ELPallEmployees.[JOBTYPE],
[code].....
I use a simple for each loop toi grab a piece of data from a regex like:
[Code]...
I have a need to collect only IPv4 MAC addresses. Currently I use this Code: But this brings up IPv6 MACs as well. How do I exclude the v6 MACs?
View 4 RepliesI'm working on an app, this is my third or fourth, but this one is throwing me for a loop(I'm in no way trained in VB btw...)Here's a pic of the app:
The whole point is to use the "<" & ">" buttons to move the cursor left and right. When you do, it highlights a single character as it moves. Then, once you select a color button, it adds a special character BEFORE the highlighter character.
Ex: Help = He^6lp ^6 being one of the colors.
I don't even know where to start
Here is my need for a windows form program. I have a program that creates .xml files with the same name but on different dates. It is broken down by Type/Date/Time/file.xml. The "file.xml" is the same name every time.
What i need is to grab all of these xml files and export them to excel by pulling certain information out of them.
coding for searching through a windows file structure to pull these files out.
There will be something like 30-40 of these files spread throughout different "Type", "Date" and "Time"
I'm trying to collect a string (filename) after it get's renamed if file exsit on upload into an array. No matter what I do I can't get it to display to a label. Been working over two weeks on the issue
Private Sub uploadfiles()
Dim uploads As HttpFileCollection
uploads = HttpContext.Current.Request.Files
[Code].....
With my CheckedListBox, I am trying to get the text of each item that is checked and add it to a listbox, but it does not get everything currently checked. If I have 3 items checked, it only adds 2 items. If I deselect an item, it appears.
lstOpCodes.Items.Clear()
Dim OpCodeCollection As CheckedListBox.CheckedItemCollection
OpCodeCollection = chkOpCodes.CheckedItems
For Each opcode In OpCodeCollection
lstOpCodes.Items.Add(opcode)
Next opcode
Most of my treelist code is working ok, however I would like to produce two arrays of string, one which contains all the parent nodes in a Treeview, and the other with all the child nodes. I'm obviously doing something stupid as I have "Object reference not set to an instance of an object." I'm not declaring something.
This is my attempt:
Private Sub listbuilder(ByVal nodelist As TreeView)
Dim parentlist() As String
Dim childlist() As String
Dim j, n As Integer
[Code] .....
I've created a function that works very well, but it's limited to AD groups direct membership. I would like to display all AD groups a user belongs to, included the nested one.
Here is my
[Code].....
I assigned an integer as 1, and looped my program using:[code]I can recieve the packets without looping, but once i loop, i receive nothing.
View 29 RepliesI am developing a program where i will download and save an xml file from a url as abc.xml. I open the abc.xml in a datagridview with a dataset without problem.I am confused how can i read raw per raw the datagridview and assign the data in a database table? i am using vb 2008 + msde2005 express.I show the whole content of the xml file in the datagridview with the following [code]I dont know how to create a loop where i can read the datagridview line by line save data in variables (ex.strings) and save it in a databese table?
View 6 RepliesCODE:
That code works to read the entry data and to recognise the correct data, and the incorrect. However, even if entry is correct, the error msgbox will appear (x times of how many records there are in file), despite being navigated to the menu. Anyway that the Else isn't triggered when data is correct. Also for it to appear just one instead of (x times of how many records there are in file.)
Makes the following statement about the code below:
**"The computer evaluates the loop condition in the Do...Loop statment to determine whether the loop instructions should be processed. In this case, the inputsales <> String.Empty condition compares the contenst of the input sales variable to the String.Empty value. As you know the String.Empty value represents a zero length, or empty, string if the inputsales variable is empty, the loop condition evaluates to True and the computer process the loop instructions. *If on the other hand the inputsales variable is not empty, the loop condition evaluates to false and the computer skips over the loop instructions.
Based on the code I think it is the opposite: ...that while the inputsales value is not empty it should evaluate to true and process the loop and if it is empty it should evaluate to false and skip the loop?
See below.
Option Explicit On
Option Strict On
Imports System.Globalization
[CODE]...
i have a string (the letters will never be in the same order):
TFTADFDAAFDADADDAFFDTFFTDFTFTDTTAFDAFADTAAATFDTADAFFTFTDDFDAFFTAT
1) i know it is always going to 65 characters (no numbers)
2) it will only have the letters ADFT
i want to loop through each row of data and check if the data contains this.
System.Text.RegularExpressions.Regex.IsMatch()
I am trying to populate a dataset with data from a dynamic SQL dataset created by a code generator (PDSA). If I want the first row of data, or I use a specific "Where" clause to retrieve 1 row, I have no problem. But, when I loop through the dataset that has four entries, instead of getting the four entries, I get the first row 4 times.
Code Example:
Dim DS_C as New DS
Dim dr_A As DS_C.Tbl_ARow
Me.DS_C.Tbl_A.Clear()
[Code].....
I get:
System.InvalidCastException = {"Unable to cast object of type 'System.Data.DataRow' to type 'TblXLMajorPerilsRow'."}
I stucked by the xml problem, I want to read out the data and use the data to insert to database.
[Code]...
I use VB.NET 2010. So, I have to create a file, which has to follow a very old standard. I use a For Each / Next loop to get all my data. During this loop, I have to check the next entry before it is called. and if the next entry has some condition, it is not allowed to be called again....
Code Example:
For Each myData in Data
Dim nxt = Data.FindIndex(myData)
If Data(nxt+1).Depends = True Then
Data.RemoveAt(nxt+1)
End If
Next
an application i developed using vb 2008 express, to fill a web form with data from an access database, one after another when a button is clicked hasn't given me what i expected. the loop was suposed to stop after filling web form with the first data on clicking a button and continue to fill the webform with the next(2nd) data from the database on clicking the button again. Below is the code i wrote
Private
Sub STARTButton_Click(ByVal
sender As System.Object,
ByVal e
[Code]....
I am trying to loop through the rows of my gridview and retrieve the data key value of each row and then execute some code to run sql queries. How can I get the data key value of each row in variable? right now I am receiving an error message saying:
value of type system.web.ui.webcontrols.datakey cannot be converted to integer.
Here is my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For Each row As GridViewRow In GridView1.Rows
Dim therowindex As Integer = row.RowIndex
[code]....
I'm stuck in converting the rate in the datalist. My page contain one dropdownlist(currency converter), one datalist - inside contain the price of bags in labels. Now I uses the dropdownlist.selectedIndexchange
Protected Sub ddl_rate_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddl_rate.SelectedIndexChanged
Dim lbl_rate As Label = roomList.Items.Item(0).FindControl("lbl_rate")
[Code]....
Currently, I am looking for a solution to makes my data loop at the code behind? It is actually an announcement list that query from database which contains the title and contents.
cmdDa = New SqlDataAdapter("SELECT * FROM announcement ORDER BY announcement_PostDT DESC", conn)
ds = New DataSet()
cmdDa.Fill(ds, "announcement")[code]....
Should I put it into a panel, list view or anything and loop it?
I'm switching over from PHP to vb.net. And some of the concepts are a bit different. Mainly I struggle with concepts and keywords, so it hard to look stuff up. Currently I'm creating a dashboard and needs to run a lot of different sql queries. But I see where I should be able to minimize my code. But things that I have tired don't work. Example below of two chunks of code that I should be able to put in some type of loop and increment a value for my sqlstring and textbox output.
[Code]...
I'm trying to just iterate through this xml and grab all of its data and add it to my collection(_personOC). Right now it's not working. How can I do this without having to specify the id? All I did was make a dataset with a person table and saved it as a xml.
Public Property personOC As ObservableCollection(Of Person)
Get
Return _personOC
[Code]....
How do I use for loop in vb.net something like
dim start as integer
Dim customers as New List(Of Customers)
Customers=dataAcess.GetCustomers()[code].....
I want to process some data for each 500 customers..
I found this snippet which loops the the old and new values, but I need to figure out the Parameter names that the values are associated with.
Sub DisplayValues(ByVal newValues As OrderedDictionary, ByVal oldValues As OrderedDictionary)
test.Text &= "<br/></br>"
' Iterate through the new and old values. Display the
[Code].....