在VB2010中用SQL语句新建表问题
我想在ACCESS数据库中新建表名为"tbl_1"的表,加入a和b两个字段,可是一直不能完成.我是完全新手,所以请大家帮我看看我应该怎么改.
我的代码:
Imports System.Data
Imports System.Data.OleDb
Public Class frmDengLu
Dim conn As New OleDbConnection
Dim CMD As New OleDbCommand
Private Sub btnKS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKaiShi.Click
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=G:\我的数据库.accdb"
conn.Open()
CMD.Connection = conn
= "CREATE TABLE tbl_1(a int,b varchar(255))"
End Sub
End Class