请问如何在VB中用SQL语句建立SQL数据库?
请问如何在VB中用SQL语句建立SQL数据库包括里面的表,视图等?
[解决办法]
Dim strSQL As String
Dim cnnUser As New ADODB.Connection
cnnUser.open gstrConn
strSQL= "CREATE DATABASE 数据库名 "
cnnUser.Execute strSQL
[解决办法]
'数据库
Public Conn As New ADODB.Connection
Public Rs As New ADODB.Recordset
Public ConDb As String
Public StrSql As String
StrSql = "select * from DataName "
Conn.Open ConDb
Rs.Open StrSql, Conn, adOpenDynamic, adLockOptimistic