tailieunhanh - Kết nối dữ liệu từ SQL 2005 sang Visual Basic 2005

Private Sub Button1_Click(ByVal sender As , ByVal e As ) Handles Dim conn As New ("Provider=SQLNCLI;Server=.\SQLEXPRESS;Database=TênData; Uid=sa; Pwd=MậtKhau;") () Dim cmd As New ("CREATE TABLE persons ( " & _ "AutoId int identity ," & | Kêt nôi dû lieu tù SQL 2005 sang Visual Basic 2005 Nguôn Private Sub Button1_Click ByVal sender As ByVal e As Handles Dim conn As New Provider SQLNCLI Server . SQLEXP RESS Database TênData Uid sa Pwd MâtKhau Dim cmd As New CREATE TABLE persons _ Autold int identity _ Id int NOT NULL _ Name NVarchar 50 _ BirthDate datetime _ IdCountry int _ CONSTRAINT pk_AutoId PRIMARY KEY Autold conn Try Catch ex As OleDbException Catch ex As Exception GeneralException End Try End .

TỪ KHÓA LIÊN QUAN