Is it possible to create a database within MSSQL-server from a VFP-client by for example using SQLEXEC()-function. I have tried the following with no success:
gcMydatabaseName="MyName"
lcMap="\\myServer\mySQLDataFiles"
lcCreateDatabaseString1="CREATE DATABASE "+gcMydatabaseName+" ON PRIMARY (NAME = "+gcMydatabaseName+"_Data,"+;
"FILENAME = "+lcMap+gcMydatabaseName+"_Data.mdf',"+;
"SIZE=20MB,MAXSIZE=100MB,FILEGROWTH=10MB)"
lcCreateDatabaseString2= " LOG ON (NAME = "+gcMydatabaseName+;
"_Log,FILENAME = "+lcMap+gcMydatabaseName+"_Log.ldf',"+;
"SIZE=5MB,MAXSIZE=15MB,FILEGROWTH=1MB)"
lnTest1=SQLEXEC(gnConSQL,lcCreateDatabaseString1)
? lnTest1 returns -1
lnTest2=SQLEXEC(gnConSQL,lcCreateDatabaseString2)
? lnTest2 returns -1
gnConSQL handle is created by connecting to the SQL-server master database and also tested by connecting to the SQL-server without any database specification.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only