 |
|
รบกวนพี่ๆๆ ขอโค้ดการเปลี่ยนรหัสผ่านของ admin อ่ะค่ะ |
|
 |
|
|
 |
 |
|
Code (VB.NET)
strSQL = "UPDATE customer SET " & _
" CustomerID = '"& Me.txtCustomerID.Text &"' " & _
" ,Name = '"& Me.txtName.Text &"' " & _
" ,Email = '"& Me.txtEmail.Text &"' " & _
" ,CountryCode = '"& Me.txtCountryCode.Text &"' " & _
" ,Budget = '"& Me.txtBudget.Text &"' " & _
" ,Used = '"& Me.txtUsed.Text &"' " & _
" WHERE CustomerID = '" & Request.QueryString("CustomerID") & "' "
objCmd = New MySqlCommand
With objCmd
.Connection = objConn
.CommandText = strSQL
.CommandType = CommandType.Text
End With
|
 |
 |
 |
 |
Date :
2011-03-28 15:30:59 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากนะค่ะ
พี่ค่ะ อันนี้ของ SQL หรอค่ะพี่ หรือเขียนลงใน vb 2005 อ่ะค่ะ
|
 |
 |
 |
 |
Date :
2011-03-28 21:27:36 |
By :
ice |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ีพี่ค่ะ รบกวนอีกหน่อยนะค่ะ หนู่หา error ไม่เจออ่ะค่ะ
Dim con As New SqlConnection(data)
con.Open()
Dim str As String = "insert into at_customer values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & ComboBox1.Text & "','" & DTP1.Text & "','" & MTB1.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')"
Dim com As New SqlCommand
com.CommandType = CommandType.Text
com.CommandText = str
com.Connection = con
com.ExecuteNonQuery()
MsgBox("เพิ่มข้อมูลเรียบร้อยแล้ว")
con.Close()
TextBox1.Clear()
TextBox2.Clear()
ComboBox1.ResetText()
DTP1.ResetText()
MTB1.ResetText()
TextBox3.Clear()
TextBox4.Clear()
sara()
End If
|
 |
 |
 |
 |
Date :
2011-03-29 09:46:08 |
By :
ice |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันขึ้นฟ้องตรง >>>> com.ExecuteNonQuery() หาไม่เจอจริงๆๆค่ะ รบกวนหน่อยนะค่ะ
|
 |
 |
 |
 |
Date :
2011-03-29 09:47:25 |
By :
ice |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|