|
-
Apr 15th, 2013, 02:41 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Create Tables
Hi
In the Below code tables are created in Master , whereas tables should be created in MyDatabase.
Dim str As String
Dim sql As String
Dim str_use As String
str = "CREATE DATABASE MyDatabase ON PRIMARY " & _
"(NAME = MyDatabase_Data, " & _
" FILENAME = 'E:\T01-02.mdf', " & _
" SIZE = 2MB, " & _
" MAXSIZE = 10MB, " & _
" FILEGROWTH = 10%) " & _
" LOG ON " & _
"(NAME = MyDatabase_Log, " & _
" FILENAME = 'E:\T01-02.ldf', " & _
" SIZE = 1MB, " & _
" MAXSIZE = 5MB, " & _
" FILEGROWTH = 10%) "
conFind.Execute (str)
str_use = "Use MyDatabase"
conFind.Execute (str_use)
sql = "Create table VType(" & _
"[vtype] [nvarchar](20)" & _
"Primary Key([VType]))"
conFind.Execute (sql)
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|