|
 |
|
การเพิ่มข้อมูลมีปัญหาครับ ช่วยแก้หน่อย มันไม่ยอมเพิ่มครับ ปกติ ก็เชื่อมต่อ dbได้มีรูปฟอร์มให้ดู |
|
 |
|
|
 |
 |
|
มันไม่ยอมเพิ่มครับ ปกติ ก็เชื่อมต่อ dbได้
มีรูปฟอร์มให้ดู

oี่เป็น error

Code (VB.NET)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
preidname = TextBox1.Text
prepassword = TextBox2.Text
confirmpass = TextBox3.Text
preadmin_code = TextBox4.Text
admin_code = "CL9X-9R79-8B8X8-27F55-D2"
If preidname = "" And prepassword = "" And confirmpass = "" And preadmin_code = "" Then
MessageBox.Show("ข้อมูลในช่องที่ต้องใส่ไม่ครบ กรุณาใส่ให้ครบด้วยค่ะ" & vbCrLf & "กรุณาใส่ข้อมูลให้ถูกต้อง", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning)
Else
If prepassword = confirmpass Then
If preadmin_code = admin_code Then
mycon.Open()
mycmd = New OleDbCommand("INSERT InTO user_db(idname,password)" & _
"Values ('" & preidname & "','" & prepassword & "')", mycon)
mycmd.ExecuteNonQuery()
MessageBox.Show("บันทึกข้อมูลลงเรียบร้อย", "ผลการทำงาน", MessageBoxButtons.OK, MessageBoxIcon.Information)
mycon.Close()
Else
MessageBox.Show("admin code ผิดพลาด" & vbCrLf & "กรุณาใส่ข้อมูลให้ถูกต้อง", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
Else
MessageBox.Show("password ทั้ง 2 ช่องไม่ตรงกัน" & vbCrLf & "กรุณาใส่ข้อมูลให้ถูกต้อง", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End If
End Sub
ยังไงนี่ผมพึ่งเริ่มทำครับ ถ้าท่านยังมีระบบที่ดีกว่าผมก็บอกได้ครับ
ผมก็รุ้ว่านี่ยังไม่สมบูรณเท่าไร ก็แต่พึ่งเริ่มทำนี่ ใครที่ช่วยทำได้ก็ช่วยหน่อยครับ - -    
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-09-02 19:45:35 |
By :
phoenix69 |
View :
1216 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่เห็นภาพ Error เลยครับ
|
 |
 |
 |
 |
Date :
2009-09-06 20:11:54 |
By :
inanosms |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|