Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Data.Odbc
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim conn As OdbcConnection
- Dim comm As OdbcCommand
- Dim dr As OdbcDataReader
- Dim connectionString As String
- Dim sql As String
- connectionString = "DSN=14itr048;UID=14itr048;Pwd=14itr;"
- sql = "SELECT balance from bank where name=' " & TextBox1.Text & " ' and password=' " & TextBox2.Text & " ';"
- conn = New OdbcConnection(connectionString)
- conn.Open()
- comm = New OdbcCommand(sql, conn)
- dr = comm.ExecuteReader()
- While (dr.Read())
- TextBox3.Text = (dr.GetValue(0).ToString())
- ' TextBox3.Text = (dr.GetValue(1).ToString())
- 'TextBox3.Text = (dr.GetValue(2).ToString())
- End While
- conn.Close()
- dr.Close()
- comm.Dispose()
- conn.Dispose()
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement