The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi All,
I have 2 tables, TradeIn and ParaTable
Both the tables have Fields ---TradeInNo and DivCd
IF the TradeIn No is 100 the first time for a particular DivCd, on successive attempts it should be incremented. i.e., 101, 102, 103...etc
DivCd is used to identify the various divisions namely, A, B, C, D according to which the TradeInNo is classified. That is for Division A tradeIn NO starts at 1000, B - 2000 etc.
The below code gets me the first TradeInNo directly as available in Paratable:
Code:
----------
Private Sub btnCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreate.Click
txtDate.Text = Date.Today
Dim con As String = Application("conn")
Dim SqlCon As New SqlConnection(con)
Dim str As String
str = ("Select TradeInNo from ParaTable where DivCd=''" & Application("DiviID") & "''")
Dim cmd As SqlCommand = New SqlCommand(str, SqlCon)
SqlCon.Open()
Dim dr As SqlDataReader
dr = cmd.ExecuteReader()
While dr.Read
txtTradeInNo.Text = dr.Item("TradeInNo").ToString
End While
SqlCon.Close()
End Sub
-----------------------------------------------
I want it that the last Trade In No from TradeInNo Table be checked and then this value should be incremented to give the new value for the corresponding division.
Kindly help me to sort this out.
Thanks and Regards,
lis
Db is in Sql