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
4

1 回答 1

0

使用
ds.Tables(0)。行(0)(“移动”).ToString();
.............
................
您缺少 Datatable
Cheers的 Index of Rows 集合

于 2012-05-06T04:30:08.433 回答