EStallworth
Well-known member
I have a dataset that accepts decimal values and it set up to send those values to a table in SQL. The columns in which I am sending the data is set up to accept decimals. I have the dataset bound to a datagrid and within the grid it displays decimal values. My problem is that the SQL table is only accepting whole numbers. Has anyone else encountered this problem?¿
Here is the code for this particular event
Here is the code for this particular event
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] table1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataTable[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] row1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataRow[/SIZE]
[SIZE=2]table1 = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataTable([/SIZE][SIZE=2][COLOR=#800000]"Posts"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.MinimumCapacity = 1[/SIZE]
[SIZE=2][COLOR=#008000]'creating a new table for posted returns[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] identification [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"ID"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]identification.AutoIncrement = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]identification.AutoIncrementSeed = 1[/SIZE]
[SIZE=2]identification.AllowDBNull = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]identification.Unique = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"ID"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] accountnumber [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"AcctCode"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"AcctCode"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] name [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Name"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Name"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] period [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Period"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Period"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] status [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Status"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Status"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] duedate [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"DueDate"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"DueDate"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] returntype [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetnType"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetnType"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] units [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"NumUnits"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"NumUnits"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] unitsrented [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"UnitsRented"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"UnitsRented"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] postingdate [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"PostDate"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"PostDate"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] paymentdate [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"PaymentDate"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"PaymentDate"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] insertdate [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"InsertDate"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]insertdate.AllowDBNull = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"InsertDate"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] receiptdate [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"ReceiptDate"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"ReceiptDate"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] checknumber [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"CheckNumber"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"CheckNumber"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] checkamount [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"CheckAmount"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"CheckAmount"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] grossreceipts [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetGross"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetGross"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] exemptreceipts [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetExempt"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetExempt"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] taxablereceipts [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetTaxable"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetTaxable"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] adjustments [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetAdjust"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetAdjust"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] totaldue [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetTotalDue"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetTotal"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] collectionallowance [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetAllowance"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetAllowance"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] penalty [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetPenalty"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetPenalty"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] interest [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetInterest"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetInterest"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] totalamount [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"RetTotalDue"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"RetTotalDue"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] totalpaid [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"TotalPay"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"TotalPay"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] returnbalance [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Balance"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Balance"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] accountbalance [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Account Balance"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]table1.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Account Balance"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] acctnum [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] names [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] periods [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Single[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] status1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] numunits [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] numrented [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] duedates [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] returntypes [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] postingdates [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] paymentdates [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] receiptdates [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] checknum [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] checkamt [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] gross [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] exempt [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] taxable [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] adjust [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] total [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] collection [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] penalties [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] interests [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] totalamounts [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] totalspaid [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] returnbalances [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] acctbalance [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] id [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2]id = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum = ComboBox1.Text[/SIZE]
[SIZE=2]names = Str(Val(Label28.Text))[/SIZE]
[SIZE=2]periods = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status1 = Label67.Text[/SIZE]
[SIZE=2]numunits = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates = duedatelabel.Text[/SIZE]
[SIZE=2]returntypes = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates = postdatetxt.Text[/SIZE]
[SIZE=2]paymentdates = paydatetxt.Text[/SIZE]
[SIZE=2]receiptdates = receiptdatetxt.Text[/SIZE]
[SIZE=2]checknum = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#008000]'adding rows to table[/COLOR][/SIZE]
[SIZE=2]row1 = table1.NewRow[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"ID"[/COLOR][/SIZE][SIZE=2]) = id[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"AcctCode"[/COLOR][/SIZE][SIZE=2]) = acctnum[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"Name"[/COLOR][/SIZE][SIZE=2]) = names[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"Period"[/COLOR][/SIZE][SIZE=2]) = periods[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"Status"[/COLOR][/SIZE][SIZE=2]) = status1[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"DueDate"[/COLOR][/SIZE][SIZE=2]) = duedates[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetnType"[/COLOR][/SIZE][SIZE=2]) = returntypes[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"NumUnits"[/COLOR][/SIZE][SIZE=2]) = numunits[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"UnitsRented"[/COLOR][/SIZE][SIZE=2]) = numrented[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"InsertDate"[/COLOR][/SIZE][SIZE=2]) = duedatelabel.Text[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"PostDate"[/COLOR][/SIZE][SIZE=2]) = postingdates[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"PaymentDate"[/COLOR][/SIZE][SIZE=2]) = paymentdates[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"ReceiptDate"[/COLOR][/SIZE][SIZE=2]) = receiptdates[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"CheckNumber"[/COLOR][/SIZE][SIZE=2]) = checknum[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"CheckAmount"[/COLOR][/SIZE][SIZE=2]) = checkamt[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetGross"[/COLOR][/SIZE][SIZE=2]) = gross[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetExempt"[/COLOR][/SIZE][SIZE=2]) = exempt[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetTaxable"[/COLOR][/SIZE][SIZE=2]) = taxable[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetAdjust"[/COLOR][/SIZE][SIZE=2]) = adjust[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetTotalDue"[/COLOR][/SIZE][SIZE=2]) = total[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetAllowance"[/COLOR][/SIZE][SIZE=2]) = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(collection, 2)[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetPenalty"[/COLOR][/SIZE][SIZE=2]) = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(penalties, 2)[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetInterest"[/COLOR][/SIZE][SIZE=2]) = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(interests, 2)[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"RetTotalDue"[/COLOR][/SIZE][SIZE=2]) = totalamounts[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"TotalPay"[/COLOR][/SIZE][SIZE=2]) = totalspaid[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"Balance"[/COLOR][/SIZE][SIZE=2]) = returnbalances[/SIZE]
[SIZE=2]row1([/SIZE][SIZE=2][COLOR=#800000]"Account Balance"[/COLOR][/SIZE][SIZE=2]) = acctbalance[/SIZE]
[SIZE=2]table1.Rows.Add(row1)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] dataset13 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataSet[/SIZE]
[SIZE=2]dataset13 = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataSet[/SIZE]
[SIZE=2]dataset13.Tables.Add(table1)[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] returnbalances >= 0 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] sqlSelectCommand [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] SqlClient.SqlCommand([/SIZE][SIZE=2][COLOR=#800000]"SELECT * FROM Payments"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].cn)[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].sql.SelectCommand = sqlSelectCommand[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] ComBuild [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.Data.SqlClient.SqlCommandBuilder([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].sql)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] UpdateCom [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Data.SqlClient.SqlCommand = ComBuild.GetUpdateCommand[/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].sql.Update(table1)[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MessageBox.Show(ex.Message)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] sqlSelectCommand [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] SqlClient.SqlCommand([/SIZE][SIZE=2][COLOR=#800000]"SELECT * FROM Payments"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].cn)[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].sql.SelectCommand = sqlSelectCommand[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] combuild [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.Data.SqlClient.SqlCommandBuilder([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].sql)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] UpdateCom [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Data.SqlClient.SqlCommand = combuild.GetUpdateCommand[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] tables2 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataTable[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] rows1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataRow[/SIZE]
[SIZE=2]tables2 = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataTable([/SIZE][SIZE=2][COLOR=#800000]"Negative_Balances"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]tables2.MinimumCapacity = 1[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] identificationnum [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"ID"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]identificationnum.AutoIncrement = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]identificationnum.AutoIncrementSeed = 1[/SIZE]
[SIZE=2]identificationnum.AllowDBNull = [/SIZE][SIZE=2][COLOR=#0000ff]False[/COLOR][/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"ID"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] account [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Account_Number"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]account.AllowDBNull = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Account_Number"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] namess1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Name"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Name"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] report [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Report_Period"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Report_Period"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Single[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] datedue [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Due_Date"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Due_Date"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] bal [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Account_Balance"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Account_Balance"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] stat [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataColumn = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataColumn([/SIZE][SIZE=2][COLOR=#800000]"Status"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]tables2.Columns.Add([/SIZE][SIZE=2][COLOR=#800000]"Status"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]GetType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2]rows1 = tables2.NewRow[/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"ID"[/COLOR][/SIZE][SIZE=2]) = ComboBox1.SelectedIndex [/SIZE][SIZE=2][COLOR=#008000]'an attempt to see if the variable is receiving the wrong data due to it being declared public[/COLOR][/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"Account_Number"[/COLOR][/SIZE][SIZE=2]) = acctnum[/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"Name"[/COLOR][/SIZE][SIZE=2]) = names[/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"Report_Period"[/COLOR][/SIZE][SIZE=2]) = periods[/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"Due_Date"[/COLOR][/SIZE][SIZE=2]) = duedates[/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"Account_Balance"[/COLOR][/SIZE][SIZE=2]) = acctbalance[/SIZE]
[SIZE=2]rows1([/SIZE][SIZE=2][COLOR=#800000]"Status"[/COLOR][/SIZE][SIZE=2]) = status1[/SIZE]
[SIZE=2]tables2.Rows.Add(rows1)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] dataset14 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataSet[/SIZE]
[SIZE=2]dataset14 = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] DataSet[/SIZE]
[SIZE=2]dataset14.Tables.Add(tables2)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] newadapter [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] SqlClient.SqlDataAdapter([/SIZE][SIZE=2][COLOR=#800000]"SELECT * FROM PreReceivePayments"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].cn)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] combuild1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.Data.SqlClient.SqlCommandBuilder(newadapter)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] updatecom1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Data.SqlClient.SqlCommand = combuild1.GetUpdateCommand[/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]newadapter.Update(tables2)[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].sql.Update([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].table1)[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MessageBox.Show(ex.Message)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Close()[/SIZE]