1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
TextBox1.Focus()
TextBox1.Text = "111"
CherchLogin()
End Sub
Sub CherchLogin()
Dim oCon = New SqlConnection
Dim oCom = New SqlCommand
Dim datarider As SqlDataReader
Dim sSql As String
oCon.ConnectionString = "Server=(Local);Initial Catalog=Pharma;trusted_Connection=true;"
oCon.Open()
sSql = "SELECT utilisateur FROM LOGIN WHERE Login='" & Request("111") & "'"
oCom = New SqlCommand(sSql, oCon)
datarider = oCom.ExecuteReader()
TextBox2.DataBind()
oCon.Close()
End Sub |