2012-05-04 3 views
0
Private Sub frmbranch_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load 
    Try  str = "select * from EnquiryEntry Where EnquiryId=" & EnquiryId & "" 
      ds = DAL.GetDataSetFromSQL(str) 
      Me.cbocustomertype.Text = ds.Tables(0).Rows("CustomerType").ToString 
      Me.cmbbranch.Text = ds.Tables(0).Rows("Branch").ToString 
      Me.txtcustomerid.Text = ds.Tables(0).Rows("CustomerId").ToString 
      Me.txtName.Text = ds.Tables(0).Rows("ClientName").ToString 
      Me.txtAddress.Text = ds.Tables(0).Rows("clientAddr").ToString 
      Me.txtMobileNo.Text = ds.Tables(0).Rows("Mobile").ToString 

     Catch ex As Exception 
      MsgBox(ex.Message.ToString, MsgBoxStyle.Exclamation, Me.Text) 
     End Try 
    End Sub 
+1

어떤 줄이 예외를 throw합니까? –

답변

0

사용할 수있어
ds.Tables (0). 행 (0) ("모바일") ToString();
...............
...............
당신은 데이터 테이블
의 Rows 컬렉션의 인덱스를 누락 건배

관련 문제