Home > Web Front-end > JS Tutorial > use jscript Create a SQL Server database_javascript技巧

use jscript Create a SQL Server database_javascript技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 19:12:23
Original
1477 people have browsed it

Create a SQL Server database.

复制代码 代码如下:

DB_SIZE_IN_MEGABYTES = 5
strDBServerName = "."

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName

Set objDB = CreateObject("SQLDMO.Database")
Set objFG = CreateObject("SQLDMO.Filegroup")
Set objDBFile = CreateObject("SQLDMO.DBFile")
Set objLogFile = CreateObject("SQLDMO.LogFile")

objDB.Name = "ScriptingGuysTestDB"
objDBFile.Name = "ScriptingGuysTestDB_Data"
objDBFile.PhysicalName = "C:Program FilesMicrosoft SQL ServerMSSQLdataScriptingGuysTestDB_Data.MDF"
objDBFile.Size = DB_SIZE_IN_MEGABYTES

objDB.FileGroups("PRIMARY").DBFiles.Add(objDBFile)

objSQLServer.Databases.Add(objDB)


Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
What's the use of this?
From 1970-01-01 08:00:00
0
0
0
Use hook
From 1970-01-01 08:00:00
0
0
0
mac use
From 1970-01-01 08:00:00
0
0
0
Use import namespace problem
From 1970-01-01 08:00:00
0
0
0
use Think\Controller;report error
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template