Click here to Skip to main content
15,904,416 members

Comments by Aman.Jen (Top 25 by date)

Aman.Jen 30-Dec-16 20:56pm View    
No exception My Friend
Aman.Jen 30-Dec-16 6:07am View    
Thank You So Much
Aman.Jen 7-Jul-13 5:54am View    
Hi,
I am using while loop in here..but it still showing just last record..

If dr.HasRows Then

While dr.Read()

TB1.Text = dr.Item("P_id").ToString
TB2.Text = dr.Item("P_Name").ToString
End While
End If

Plz suggest a solution

Thnx
Aman.Jen 6-Jul-13 13:19pm View    
plz eleborate...

thnx
Aman.Jen 6-Jul-13 9:27am View    
Plz see the code....even this not working...Dont know wat is issue....not showing any error but neither working


Public Sub bindat()
cmd.Connection = cn
Dim id As String = DPList.SelectedItem.Value

cmd.CommandText = "Select Bor_Name,coBor_Name,Loan_type,Loan_Sanc,Sanc_Perd,TotalLoan_Disb,Curt_EMI Curt_ROI,Prinp_Out,EMI_OVdue from Acct_Sum where Bor_Name = '" & DPList.SelectedItem.Value & "'"

cmd.CommandText = "Select Bor_Name,coBor_Name,Loan_type,Loan_Sanc,Sanc_Perd,TotalLoan_Disb,Curt_EMI Curt_ROI,Prinp_Out,EMI_OVdue from Acct_Sum where Bor_Name ='" & id & "'"
Dim da As New SqlDataAdapter(cmd)
Dim dt As New DataTable
cmd.Parameters.AddWithValue("id", DPList.SelectedItem.Value)
da.Fill(dt)

If (dt.Rows.Count > 0) Then
t1.Text = dt.Rows(0)("Bor_Name").ToString()
t2.Text = dt.Rows(0)("coBor_Name").ToString()
t3.Text = dt.Rows(0)("Loan_type").ToString()
t4.Text = dt.Rows(0)("Loan_Sanc").ToString()
t5.Text = dt.Rows(0)("Sanc_Perd").ToString()
t6.Text = dt.Rows(0)("TotalLoan_Disb").ToString()
t7.Text = dt.Rows(0)("Curt_EMI").ToString()
t8.Text = dt.Rows(0)("Curt_ROI").ToString()
t9.Text = dt.Rows(0)("Prinp_Out").ToString()
t10.Text = dt.Rows(0)("EMI_OVdue").ToString()
End If
End Sub