Dim strCustomerID As String = ds.Table(0).Rows(0)("CustomerID")
Date :
2010-09-19 06:46:27
By :
webmaster
No. 2
Guest
ขอบคุณมากค่ะ เด๋วลองไปทำดูนะคะ
Date :
2010-09-19 14:55:34
By :
jdai
No. 3
Guest
แล้วถ้าเป็นโค๊ดแบบนี้เขียนไงคะ
sb.Remove(0, sb.Length())
sb.Append(" SELECT PID,DateMove,TimeMove,KeepID,His_status,Move_Name ")
sb.Append(" FROM DisMove,TRANSFERMOVE")
sb.Append(" WHERE (DisMove.MoveID=TRANSFERMOVE.MoveID)")
sb.Append(" AND (DisMove.PID=@PID)")
sb.Append(" ORDER BY PID")
Dim sqlSearchNk As String
sqlSearchNk = sb.ToString()
dt = New DataTable()
Com = New SqlCommand()
With Com
.Parameters.Clear()
.Parameters.Add("@PID", SqlDbType.NVarChar).Value = lblID.Text.Trim()
.CommandText = sqlSearchNk
.CommandType = CommandType.Text
.Connection = Conn
dr = .ExecuteReader
If dr.HasRows Then
dt.Load(dr)
Dim bs As BindingSource = New BindingSource()
bs.DataSource = dt
Dim bn As New BindingNavigator
bn.BindingSource = bs