Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mssql
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Mssql
Miscellaneous
Thread ID:
00698181
Message ID:
00698199
Views:
15
>>>Can I create databases with the MSSQL that comes with the setup of vfp7.0.
>>>I would like to develop an appl. that has SQL as backend but I only have the version of SQL that's on the vfp7-setup-cd .
>>>Can anybody help on the way.
>>
>>I understand that this server comes without the administrative tools. I heard you can use Access as an administrative tool.
>>
>>HTH, Hilmar.
> And how would you do that (with Acces), I would like to create a new database.
>I think you can do that from foxpro with sql statements (you can create tables, but I don't know if I can create a new database)

* First you have to connect to the server. You can do this using ODBC connection and SQLConnect command.(In that case you could create an ODBC connection to master database). Another way is to use SQLStringConnect command, but you have to be familar with connection string parts.

* Then you can create your database using CREATE DATABASE command. Here is the syntax:
CREATE DATABASE database_name 
[ ON 
    [ < filespec > [ ,...n ] ] 
    [ , < filegroup > [ ,...n ] ] 
] 
[ LOG ON { < filespec > [ ,...n ] } ] 
[ COLLATE collation_name ]
[ FOR LOAD | FOR ATTACH ] 

< filespec > ::= 

[ PRIMARY ]
( [ NAME = logical_file_name , ] 
    FILENAME = 'os_file_name' 
    [ , SIZE = size ] 
    [ , MAXSIZE = { max_size | UNLIMITED } ] 
    [ , FILEGROWTH = growth_increment ] ) [ ,...n ]

< filegroup > ::= 

FILEGROUP filegroup_name < filespec > [ ,...n ]
but is it enought to use only CREATE DATABASE
Venelina Jordanova

Outsourcing IT Services Ltd.
Previous
Reply
Map
View

Click here to load this message in the networking platform