The following code wont run it keeps assigning 0 to lblCount.Text. Any Ideas?
I am trying to pull a column of ID numbers into the array and then be able to display an arbitrary array value.
Sub createArray(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim cnn2 As String = (ConfigurationSettings.AppSettings("SomeWebSite"))
Dim objConnection2 as new sqlConnection(cnn2)
Dim objCommand2 as new SqlCommand("procThatPullsIDsFromTable", ObjConnection2)
objCommand2.CommandType = CommandType.StoredProcedure
objCommand2.Connection = ObjConnection2
Dim objreader As SqlDataReader = objCommand2.ExecuteReader()
ReDim MyArray(countIDs) 'countIDs is set in a different section of code
Do While objreader.Read()
For I = 1 to countIDs
MyArray(I) = objreader.GetInt32(0)
lblCount.Text = MyArray(2) 'Display one of the values of the array
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code.
First, I create an Abstract Class for my DataTables Common Code. This class Inherits from DataTable.
Also, it can …
Creating an analog clock UserControl seems fairly straight forward. It is, after all, essentially just a circle with several lines in it! Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210 (2 * 3 * 5 * 7) or 2310 (2 * 3 * 5 * 7 * 11).
The larger templa…