1 Replies - 792 Views - Last Post: 02 March 2009 - 02:47 AM Rate Topic: -----

#1 jigneshp25   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-March 09

Datatable Problems (?)

Posted 02 March 2009 - 02:23 AM

Private Sub btsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btsearch.Click
        
        If txtcase.Text = "" And txtname.Text = "" Then
            MsgBox("Enter The Information", MsgBoxStyle.Information, "Information Required")
            Exit Sub
        ElseIf txtcase.Text <> "" And txtname.Text <> "" Then
            MsgBox("Enter The at a time one Information", MsgBoxStyle.Information, "More Information")
            Exit Sub
        Else
            Dim dataData As New OleDb.OleDbDataAdapter(New OleDb.OleDbCommand("Select * From customerdetail where caseno=" & Val(txtcase.Text), conData))
            '   Dim dataData1 As New OleDb.OleDbDataAdapter(New OleDb.OleDbCommand("Select * From customercomplain", conData))
            Dim tabData As New Data.DataTable("oral")
            dataData.Fill(tabData)
            'dataData1.Fill(tabData)

            Dim s As Integer = tabData.Rows.Count
            While s <> 0
                txtcase.Text = tabData.Rows(s - 1).Item(0)
                txtname.Text = tabData.Rows(s - 1).Item(1)
                txtage.Text = tabData.Rows(s - 1).Item(2)
                txtpno.Text = tabData.Rows(s - 1).Item(3)
                txtadd.Text = tabData.Rows(s - 1).Item(4)
                txtcom.Text = tabData.Rows(s - 1).Item(5)
                'txtdate.Text = tabData.Rows(s - 1).Item(6)
                'txtndate.Text = tabData.Rows(s - 1).Item(7)
                'txtmno.Text = tabData.Rows(s - 1).Item(8)
                txtpay.Text = tabData.Rows(s - 1).Item(6)
                'txtrem.Text = tabData.Rows(s - 1).Item(10)
                txttreat.Text = tabData.Rows(s - 1).Item(7)
                s -= 1
                If s = 1 Then Exit Sub

            End While
        End If


    End Sub


***MOD EDIT: Added code tags. *** Please :code: ***

This post has been edited by JackOfAllTrades: 02 March 2009 - 07:25 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Datatable Problems (?)

#2 benpap   User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 51
  • Joined: 24-November 07

Re: Datatable Problems (?)

Posted 02 March 2009 - 02:47 AM

can you describe us where u need help?
and please
Paste Your Code Here

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1