J'ai mal compris ce programme
assouma
-
gregouz62 Messages postés 129 Statut Membre -
gregouz62 Messages postés 129 Statut Membre -
Bonjour,
svp vous pouvez m'aider en m'expliquant ce programme la il est relative a ado.net et vb.net (en detaille svp :) ):
Imports System.Data.SqlClient
Imports System.Data
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
G1.Enabled = False
C1.Checked = True
End Sub
Private Sub C2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C2.CheckedChanged
G1.Enabled = True
End Sub
Private Sub C1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C1.CheckedChanged
G1.Enabled = False
End Sub
Private Sub B1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1.Click
Dim con As New SqlConnection
Dim strcom As String = "server=A879CA58023A4E5;initial catalog =brahim; uid=t1.text;t2.text"
Dim strcom1 As String = "server=A879CA58023A4E5;initial catalog =brahim; integrated security =sspi"
Try
If C1.Checked = True Then
con.ConnectionString = strcom1
con.Open()
Form2.ShowDialog()
Form2.t3.Text = "la connexion est effectuer"
Else
If C2.Checked Then
con.ConnectionString = strcom
con.Open()
Form2.ShowDialog()
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
et merci infiniment d'avance
svp vous pouvez m'aider en m'expliquant ce programme la il est relative a ado.net et vb.net (en detaille svp :) ):
Imports System.Data.SqlClient
Imports System.Data
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
G1.Enabled = False
C1.Checked = True
End Sub
Private Sub C2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C2.CheckedChanged
G1.Enabled = True
End Sub
Private Sub C1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C1.CheckedChanged
G1.Enabled = False
End Sub
Private Sub B1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1.Click
Dim con As New SqlConnection
Dim strcom As String = "server=A879CA58023A4E5;initial catalog =brahim; uid=t1.text;t2.text"
Dim strcom1 As String = "server=A879CA58023A4E5;initial catalog =brahim; integrated security =sspi"
Try
If C1.Checked = True Then
con.ConnectionString = strcom1
con.Open()
Form2.ShowDialog()
Form2.t3.Text = "la connexion est effectuer"
Else
If C2.Checked Then
con.ConnectionString = strcom
con.Open()
Form2.ShowDialog()
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
et merci infiniment d'avance
A voir également:
- J'ai mal compris ce programme
- Programme demarrage windows - Guide
- Programme word gratuit - Guide
- Message programmé - Guide
- Pourquoi la tnt fonctionne mal en ce moment - Guide
- Mettre en veille un programme - Guide