Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting the Number of Data Lines Pulled From the Sequel Server 1

Status
Not open for further replies.

dataman86

Technical User
Oct 11, 2008
104
US
I have a need to have sub routine to count the number of data lines coming from the Sequel Server. Is this a possibility with a sub routine or function in VB?

DataMan86
 
I know what you are saying, but no it doesn't make sense. Before I'll go any further we need to know what your goals for all of this is. What do you want to get out of a form? Is it just so you can add the account type and calculate totals? Why do you need multiple forms? Why do you need 12 records to a form. Once you've done whatever with the form then what do you plan to do with the data? You mentioned outputting to a text file is that the final step? And I still do not get why the array when you have loaded all of the data in a table?

I know you are learning so I don't mind helping. Some times there are growing pains. Really though for something that at least sounds like you want to do something simple there shouldn't need to be this many problems.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorwen,

The data for accounting is stored in a Prod Table. The Account Type was never setup to be entered into the database. I do not know why, but it wasn't. The user will have to enter an account type for each line. Each Line can have the same account or any account types up to 25 or 30 different ones. The user must see the lines brought in so as to provide the correct account type manually. The reason for 12 lines on a page is to really make the process simpler. At the end of the year there are over 100 lines containing debit and credit entries. When I pull a transaction with the parameters Company 0429, Fiscal Year 2009, accounting Period 3 and Control Group 1 I get in this case 12 lines which contain debit and credit entries. I might put in Company 0537, Fiscal year 2009, Accountign period 4 and Control group 17 and get 100 lines with debit and credit entries. I need to be able to take all 100 lines and write it out to a text file after account types have been entered for all 100 lines manually by the user. I need for the program to just pull 12 lines at a time and place in Form1 but leave it invisable not close it, becuase I will reference these textboxes again when I start writing out to the text file. On Form1 I need a Button to load the next 12 Lines to form2 and so. For 100 records I would have 8 forms ready to write out the 100 lines becuase you could refrence each one by the forms the textboxes are in.

The reason I can't just use a Table in a gridview because it will help for display purposes. You can't enter data into the table. I need to be able manually input data on the lines for account number.

I am making adjustments with the JV to different funds and I am changing account types for money I am spending around in different funds.

Dataman86
 
dataman86 said:
You can't enter data into the table

Using a DagridGridView you CAN edit data.

Subject to the underlying queries you can SELECT, INSERT, UPDATE and DELETE data using a DataGridView. If you don't want to allow a particular action, then don't provide the SQL statement for that action.
 
Comment out all of what you have so far and use this:
Code:
Public Class Pull
    Private Function TestIt() As DataTable

        Dim sParm As String = Chr(39) & Me.TextBox1.Text.ToString & Chr(39)
        Dim tParm As String = Chr(39) & Me.TextBox2.Text.ToString & Chr(39)
        Dim uParm As String = Chr(39) & Me.TextBox3.Text.ToString & Chr(39)
        Dim vParm As String = Chr(39) & Me.TextBox4.Text.ToString & Chr(39)
        Dim wParm As String = Chr(39) & Me.TextBox5.Text.ToString & Chr(39)
        Dim connectionString As String = "Data Source=10.3.3.248; " & _
                                                      "Initial Catalog=PROD; " & _
                                                      "Persist Security Info=True; " & _
                                                      "User ID=lawson; " & _
                                                      "Password=lawson"

        Dim sSQL As String = "SELECT COMPANY, FISCAL_YEAR, ACCT_PERIOD, CONTROL_GROUP, LINE_NBR, POSTING_DATE, OBJ_ID, STATUS, ACCT_UNIT, ACCOUNT, TRAN_AMOUNT, ACCT_AMOUNT, VAR_LEVELS FROM GLTRANS WHERE COMPANY  = " & sParm & " AND FISCAL_YEAR = " & tParm & " AND ACCT_PERIOD = " & uParm & " AND CONTROL_GROUP = " & vParm & " AND POSTING_DATE = " & wParm & ";"
        Dim oCn As New SqlConnection(connectionString)
        Dim oCm As New SqlCommand(sSQL, oCn)
        oCm.CommandType = CommandType.Text

        Dim oDa As New SqlDataAdapter(oCm)
        Dim oTable As New DataTable()

        oCn.Open()
        oDa.Fill(oTable)
        oCn.Close()
        oCn.Dispose()

        Return oTable
    End Function

    Private Sub BtnPull_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPull.Click
        Me.Hide()
        Dim dt As DataTable
        dt = TestIt()

        [Red]dt.Columns.Add("Type", System.Type.GetType("System.String"))[/Red] 'Add a blank column to the data table

        Dim rc As New Record_frm(dt, 12)
        rc.Show()
    End Sub

End Class
Note the part in read. This may be were the misunderstanding is? Did you not know how to add a column to the data table. Tecnically you can now use a DataGridView if you wanted.

For now though make a new form called Record_frm and use this for the code:
Code:
Public Class Record_frm
    Dim FormTable As DataTable

    Public Sub New(ByVal CurrentData As DataTable, ByVal MaxRows As Integer)

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        SetupForm(CurrentData, MaxRows)
    End Sub

    Private Sub SetupForm(ByVal cData As DataTable, ByVal mRows As Integer)
        Dim Row, Column, X, Y, RowHeight, RowSpace As Integer

        RowHeight = 42
        RowSpace = 35

        For Row = 0 To mRows - 1
            For Column = 0 To cData.Columns.Count - 1
                Y = RowHeight + (RowSpace * Row)
                Dim tb As New TextBox
                With tb
                    .Name = "TextBox" & Format(Row, "00") & Format(Column, "00")

                    'Add Text
                    Dim TextData As String = ""
                    If IsDBNull(cData.Rows(Row).Item(Column)) = False Then TextData = cData.Rows(Row).Item(Column)
                    .Text = TextData

                    'Calculate location
                    If Column = 0 Then
                        X = 38
                    Else
                        Dim LastTB As TextBox = Me.Controls("TextBox" & Format(Row, "00") & Format((Column - 1), "00"))
                        X = (LastTB.Location.X + LastTB.Width) + 6 'Default padding between controls is 6.
                    End If
                    .Location = New Point(X, Y)

                    'Set size
                    Select Case Column
                        Case 0, 1, 2, 3              ' These tb are almost the same size already so lets make them the same size.
                            .Size = New Size(39, RowHeight)
                        Case 4                       ' Is there a reason this one is so much bigger?  If not add to above case.
                            .Size = New Size(46, RowHeight)
                        Case 5, 6
                            .Size = New Size(35, RowHeight)
                        Case 7, 8
                            .Size = New Size(42, RowHeight)
                        Case 9
                            .Size = New Size(83, RowHeight)
                        Case 10, 11, 12, 13          ' these tb are almost the same size already so lets make them the same size.
                            .Size = New Size(92, RowHeight)
                        Case Else
                            .Size = New Size(42, RowHeight)
                    End Select
                End With

                Me.Controls.Add(tb)
            Next
        Next

        'Use below if you want to autocalculate form size
        Dim FinalTB As String = "TextBox00" & Format((cData.Columns.Count - 1), "00")
        Me.Width = (Me.Controls(FinalTB).Location.X + Me.Controls(FinalTB).Width) + Me.Controls("TextBox0000").Location.X * 2
        Me.Height = RowHeight + (RowSpace * (mRows + 2))
    End Sub
End Class
This only gets you the "first page" I wanted to go ahead and post this now so you could see and play around with it. Also I've spent as much time as I can at the moment on this. I'll try to get you the next set of code before the end of the day if I can.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorwen,

Thanks I will try out the coding. You got seven stars.

Dataman86
 
Sorwen,

This works good for the first page. Also, I will need a Manual data entry field for Balance Sheet as well. I guess I can add the code just like you did for the type. When I have Line 13 through 25, do you have code for the next page?
I guess I would need a Button on the First Form saying Next Page and so for each page you need up to 96 Lines or 100 Lines and so on. I maybe wrong in my thinking on this.
Sorwen,I appreciate you taking your time to help me with this. I wish I just knew a little more. It is going to take me sometime and a few years to get up to par on VB.
They are talking out there that VB might just become one language C#. I hear this through some of the talk.

Dataman86
 
Sorwen,

Do you know if I can reference the textboxes that are named such as TextBoxoo + TextBox01 + TextBox02 and so on on the new ainstance of the form each time. It is important to be able to do calculations with the named textboses.

dataman86
 
I don't know this is the best way, but with being sick and my own project this was the fastest way to add the next steps. Just replace the whole code in Record_frm.

Code:
Public Class Record_frm
    Dim FormTable As DataTable
    Dim FormRows As Integer
    Dim FormPages As Integer

    Public Sub New(ByVal CurrentData As DataTable, ByVal MaxRows As Integer)

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        FormTable = CurrentData
        FormRows = MaxRows
        FormPages = Decimal.Ceiling(CurrentData.Rows.Count / MaxRows)
        SetupForm()
    End Sub

    Private Sub SetupForm()
        Dim Row, Column, X, Y, RowHeight, RowSpace As Integer
        Dim PageTotal As Decimal

        RowHeight = 42
        RowSpace = 35

        For Row = 0 To FormRows - 1
            For Column = 0 To FormTable.Columns.Count - 1
                Y = RowHeight + (RowSpace * Row)
                Dim tb As New TextBox
                With tb
                    .Name = "TextBox" & Format(Row, "00") & Format(Column, "00")

                    'Add Text
                    Dim TextData As String = ""
                    If IsDBNull(FormTable.Rows(Row).Item(Column)) = False Then TextData = FormTable.Rows(Row).Item(Column)
                    .Text = TextData

                    'Calculate location
                    If Column = 0 Then
                        X = 38
                    Else
                        Dim LastTB As TextBox = Me.Controls("TextBox" & Format(Row, "00") & Format((Column - 1), "00"))
                        X = (LastTB.Location.X + LastTB.Width) + 6 'Default padding between controls is 6.
                    End If
                    .Location = New Point(X, Y)

                    'Set size
                    Select Case Column
                        Case 0, 1, 2, 3              ' These tb are almost the same size already so lets make them the same size.
                            .Size = New Size(39, RowHeight)
                        Case 4                       ' Is there a reason this one is so much bigger?  If not add to above case.
                            .Size = New Size(46, RowHeight)
                        Case 5, 6
                            .Size = New Size(35, RowHeight)
                        Case 7, 8
                            .Size = New Size(42, RowHeight)
                        Case 9
                            .Size = New Size(83, RowHeight)
                        Case 10, 11, 12, 13          ' these tb are almost the same size already so lets make them the same size.
                            .Size = New Size(92, RowHeight)
                        Case Else
                            .Size = New Size(42, RowHeight)
                    End Select
                End With

                Me.Controls.Add(tb)
            Next
            'change below to the correct column to calculate
            If IsDBNull(FormTable.Rows(Row).Item(0)) = False Then
                PageTotal += FormTable.Rows(Row).Item(3)
            End If
        Next

        'Use below if you want to autocalculate form size
        Dim FinalTBName As String = "TextBox00" & Format((FormTable.Columns.Count - 1), "00")
        Dim FinalTB As TextBox = Me.Controls(FinalTBName)
        Me.Width = (FinalTB.Location.X + FinalTB.Width) + Me.Controls("TextBox0000").Location.X '* 2
        Me.Height = RowHeight + (RowSpace * (FormRows + 2))

        Dim BtnSize As New Size(25, 23)

        Dim BottomRow As Integer = RowHeight + (RowSpace * (FormRows))
        Dim PreviousBtn As New Button
        PreviousBtn.Name = "previous_btn"
        PreviousBtn.Text = "<-"
        PreviousBtn.Size = BtnSize
        PreviousBtn.Location = New Point(38, BottomRow)
        PreviousBtn.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        AddHandler PreviousBtn.Click, AddressOf PreviousPage
        Me.Controls.Add(PreviousBtn)


        Dim PageLbl As New Label
        PageLbl.Name = "page_lbl"
        PageLbl.Text = "001"
        PageLbl.TextAlign = ContentAlignment.MiddleCenter
        PageLbl.Size = New Size(30, 23)
        PageLbl.Location = New Point((38 + PreviousBtn.Width), BottomRow)
        PageLbl.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.Controls.Add(PageLbl)

        Dim NextBtn As New Button
        NextBtn.Name = "next_btn"
        NextBtn.Text = "->"
        NextBtn.Size = BtnSize
        NextBtn.Location = New Point((38 + PreviousBtn.Width + PageLbl.Width), BottomRow)
        NextBtn.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        AddHandler NextBtn.Click, AddressOf NextPage
        Me.Controls.Add(NextBtn)

        Dim PageTotalTB As New TextBox
        PageTotalTB.Name = "pagetotal_tb"
        PageTotalTB.Text = PageTotal
        PageTotalTB.Size = New Size(50, 23)
        PageTotalTB.Location = New Point((FinalTB.Location.X + FinalTB.Size.Width) - PageTotalTB.Width, BottomRow)
        PageTotalTB.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.Controls.Add(PageTotalTB)

        Dim PageTotalLbl As New Label
        PageTotalLbl.Name = "page_lbl"
        PageTotalLbl.Text = "Page Total"
        PageTotalLbl.TextAlign = ContentAlignment.MiddleLeft
        PageTotalLbl.Size = New Size(65, 23)
        PageTotalLbl.Location = New Point((PageTotalTB.Location.X - (PageTotalLbl.Width)), BottomRow)
        PageTotalLbl.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.Controls.Add(PageTotalLbl)

    End Sub

    Private Sub PreviousPage(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim PageNumber As Integer = Me.Controls("page_lbl").Text
        If PageNumber > 1 Then
            PageNumber -= 1
            SelectPage(PageNumber)
            Me.Controls("page_lbl").Text = Format(PageNumber, "000")
        End If
    End Sub

    Private Sub NextPage(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim PageNumber As Integer = Me.Controls("page_lbl").Text
        If PageNumber < FormPages Then
            PageNumber += 1
            SelectPage(PageNumber)
            Me.Controls("page_lbl").Text = Format(PageNumber, "000")
        End If
    End Sub

    Private Sub SelectPage(ByVal PageNumber As Integer)
        Dim NewPageTotal As Decimal = 0.0
        Dim StartRow As Integer = (PageNumber * FormRows) - 1

        If StartRow < FormTable.Rows.Count - 1 Then
            For Rows As Integer = 0 To FormRows - 1
                For Columns As Integer = 0 To 13
                    If IsDBNull(FormTable.Rows(StartRow + Rows).Item(Columns)) = False Then
                        Me.Controls("TextBox" & Format(Rows, "00") & Format(Columns, "00")).Text = FormTable.Rows(StartRow + Rows).Item(Columns)
                    Else
                        Me.Controls("TextBox" & Format(Rows, "00") & Format(Columns, "00")).Text = ""
                    End If
                Next

                'change below to the correct column to calculate
                NewPageTotal += FormTable.Rows(StartRow + Rows).Item(3)
            Next
        End If

        Me.Controls("pagetotal_tb").Text = NewPageTotal
    End Sub
End Class

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Do you know if I can reference the textboxes that are named such as TextBoxoo + TextBox01 + TextBox02 and so on on the new ainstance of the form each time. It is important to be able to do calculations with the named textboses.
Generally you don't want to do calculations on the form. What you want to do is run calculations from the DataTable like I did for the Page Total. BTW you want to change the row calculated to the row you needed calculated.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorwen,

That Programs works great! However, I am having a simple math problem with one of the lines. The user is entering data into the Accounting System with decimals sometimes and sometimes not. For exmaple, I saw an entry come in on one line for the Debit Side as 100.00 and the Credit Side had 100 with the decimal left off. I need for a decimal point to always be there on a number. If it is even money, I need 100 dollars to show as 100.00 as though there were cents.

I need to do this when the array is pulled and brought in here:

sParams(iLvalue, 6) = CDbl(.GetValue(6).ToString()

I need for the 100 to change to 100.00 by adding the .00 on the end of it before it is brought into Me.Controls("TextBox07").Text

How can this be done in coding to do this?

I got to catch every scenario the user will try to do. The user knows to enter 100 as 100.00 but some users just leave it of if it is even money involved. We accountants just do not like 0.00 to show, so when its 100.00 we show it as 100 without the .00 since there are no cents.

But my program must catch all of these. So I need for this to happen when it is brought in by the ARRAY. I know its a simple coding to do this, but I tried all afternoon to figure this out.

Dataman86

 
I'll tell you how, but you will need to figure out where. You can use Format to force a number to a particular format. You have to do this while it is a number and not a string. For instance if .GetValue(6) is a decimal then this works.
Code:
variable = format(.GetValue(6), "0.0")

If however .GetValue(6) is text then you have to:
Code:
variable = format(ctype(.GetValue(6), Decimal), "0.0")

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
You might actually need to do "0.00" instead. I think the other way will drop trailing zeros. So 10.10 would be 10.1 instead.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorwen,

I found out today that the accounting system written up by a contractor has some field data types as Integer and Text. So, I will just have to try it and see if it places the 0.00 on all numbers without it.

Datman86
 
Code:
If TypeOf .GetValue(6) Is Integer Then
    variable = format(.GetValue(6), "0.0")
ElseIf TypeOf .GetValue(6) Is String Then
    .....

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorwen,

I appreciate all of your help on this. I am using the DataTable for review and printing out. This program works great!

I have a small problem with understanding the coding on how to make the system make the numbers with 0.00 on the end when displayed in my form. The accounting people are entering in 100.00 as 100 when they have no cents, but my system must have .00 placed on the end. You sent me some coding, but I can't get this to work.

My coding where I need to do this is: These two

sParams(iLvalue, 6) = .GetValue(6).ToString()
and
sParams(iLvalue, 7) = .GetValue(6).ToString()

Also, the sub number is entered without numbers sometimes by the accountants. The sub is a six digit number and I have my system tom pull the last two digits of the number with this coding:

sParams(iLvalue, 5) = .GetValue(5).ToString().Substring(4, 2) 'Account

The accountants are leaving this number blank sometimes and not entering the six numbers in. I need for my system to show two blank spaces when the number is left out of the system. A Sub Number 010999. My system would bring in 99. but if the accountant has left the six numbers off, this is coming in as a blank with no numbers and this is causing me problems with argument errors when I try to pull the transaction.


When I try the variable = format(.GetValue(6), "0.0")

Nothing is happening, the 100 stays 100 and no .00 is placed on the end.

I am probably entering the coding wrong.

Dataman86
 
I'm not sure then.

If this
Code:
sParams(iLvalue, 6) = .GetValue(6).ToString()
was changed to this (like the example)
Code:
sParams(iLvalue, 6) = format(.GetValue(6), "0.0")
Then it should work. I'm not sure what is wrong. It shouldn't make a difference, but you can try this:
Code:
sParams(iLvalue, 6) = format(ctype(.GetValue(6), Decimal), "0.0")

And you will want "0.0" to be "0.00" for two decimal places.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorwen,

Would you mind looking at my coding and see why when records are pulled from the ARRAY that I am getting an extra line pulled with Nothing in it?

The coding is the Pull I listed a ways back.

Coding:


Imports System.Data.SqlClient

Public Class Pull
Private Function TestIt() As Array

Dim sParm As String = Chr(39) & Me.TextBox1.Text.ToString & Chr(39)
Dim tParm As String = Chr(39) & Me.TextBox2.Text.ToString & Chr(39)
Dim uParm As String = Chr(39) & Me.TextBox3.Text.ToString & Chr(39)
Dim vParm As String = Chr(39) & Me.TextBox4.Text.ToString & Chr(39)
Dim wParm As String = Chr(39) & Me.TextBox5.Text.ToString & Chr(39)
Dim connectionString As String = "Data Source=10.3.3.248; " & _
"Initial Catalog=PROD; " & _
"Persist Security Info=True; " & _
"User ID=lawson; " & _
"Password=lawson"

Dim sSQL As String = "SELECT LINE_NBR, COMPANY, VAR_LEVELS, OBJ_ID, ACCT_UNIT, ACCOUNT, TRAN_AMOUNT FROM GLTRANS WHERE COMPANY = " & sParm & " AND FISCAL_YEAR = " & tParm & " AND ACCT_PERIOD = " & uParm & " AND CONTROL_GROUP = " & vParm & " AND POSTING_DATE = " & wParm & ";"
Dim oCn As New SqlConnection(connectionString)
Dim oCm As New SqlCommand(sSQL, oCn)
oCm.CommandType = CommandType.Text

Dim oDa As New SqlDataAdapter(oCm)
Dim oTable As New DataTable()

oCn.Open()
oDa.Fill(oTable)
Dim MyDataReader As SqlDataReader = oCm.ExecuteReader()
Dim iLvalue As Integer
Dim iRows As Integer = oTable.Rows.Count

Dim sParams(iRows, 12) As String
With MyDataReader
If .HasRows Then
While .Read()
sParams(iLvalue, 0) = .GetValue(0).ToString() 'Line Number
sParams(iLvalue, 1) = .GetValue(1).ToString() 'compamy
sParams(iLvalue, 2) = .GetValue(2).SubString(1, 3).ToString() 'var levels apr
sParams(iLvalue, 3) = .GetValue(2).Substring(4, 4).ToString() 'var levels activity
sParams(iLvalue, 4) = .GetValue(5).ToString() 'Account 1st Four of Account
sParams(iLvalue, 5) = .GetValue(5).ToString().Substring(4, 2) 'Account Last Two of Account
If sParams(iLvalue, 5) Is Nothing Then
sParams(iLvalue, 5) = " "
Else
sParams(iLvalue, 5) = .GetValue(5).ToString().Substring(4, 2)

End If
sParams(iLvalue, 6) = .GetValue(6).ToString
If sParams(iLvalue, 6) = .GetValue(6).ToString.StartsWith("-") Then
sParams(iLvalue, 6) = "0.00"

Else
sParams(iLvalue, 6) = .GetValue(6).ToString
End If

sParams(iLvalue, 7) = .GetValue(6).ToString

If sParams(iLvalue, 7) = .GetValue(6).ToString.StartsWith("-") Then
sParams(iLvalue, 7) = CDbl(.GetValue(6).ToString) * -1
Else
sParams(iLvalue, 7) = "0.00"
End If




iLvalue += 1
End While
End If
End With

oCn.Close()
oCn.Dispose()
iLvalue = 0
Dim SName As String = "TextBox.Text"
Dim i As Integer
For i = 0 To 12
Dim TName As String = SName & CStr(iLvalue) & CStr(i)


For iLvalue = 0 To iRows - 1
TName = sParams(iLvalue, 0)
TName = sParams(iLvalue, 1)
TName = sParams(iLvalue, 2)
TName = sParams(iLvalue, 3)
TName = sParams(iLvalue, 4)
TName = sParams(iLvalue, 5)
TName = sParams(iLvalue, 6)
TName = sParams(iLvalue, 7)
TName = sParams(iLvalue, 8)
TName = sParams(iLvalue, 9)
TName = sParams(iLvalue, 10)
TName = sParams(iLvalue, 11)


Next
Next
Return sParams
End Function



I am trying to get 12 lines per page. The Array is pulling an extra line with Nothing for every column. Yet the Array should be pulling 13 Lines instead. Do not know why I am getting that extra line.

 
I have no idea for sure. At a guess it has something to do with the sqlDataReader, but I've never used one.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top