31-10-15, 04:33 PM
كود :
Private Sub Bt_Enter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bt_Enter.Click
'برمجة زر الدخول
'Frm_Login.Name = Nothing
Try
sqlconn.ConnectionString = "Data Source = ABDH-PC\SQLEXPRESS;Initial Catalog=Work_Shop;Integrated Security = True"
Catch ex As Exception
MsgBox(ex.Message)
End Try
Class1.Str = "Select User_Name,PWD from Tab_Users Where User_Name = '" & Txt_User_Name.Text & "' And PWd = '" & Txt_PWD.Text & "'"
Try
Dim sda As New SqlDataAdapter(Class1.Str, sqlconn)
Dim ds As New DataSet
sda.Fill(ds)
MsgBox(ds)
If ds.Tables(0).Rows.Count > 1 Then
Me.Close()
Frm_Main.Show()
Else
MsgBox("لا يوجد اسم مستخدم بهذا الاسم")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
انا بصمم أول برنامج بالدوت نت بعد VB6 وده كود زرار الدخول في شاشة اللوجين
بعد ماضغط دخول بيعطي رسالة الخطأ دي ؟
The Data Type text and Varchar are incompatible to operator
ياريت حد يساعدني لاني الرسالة دي تعبتني ؟ مع اني حذفت جدول اليوزرز وعملته تاني ولا فائدة ؟؟