I have spent megabucks buying a book called MSDE Bible and they have started the book by not telling how you create a database (with all the exact steps required so you can actually work with it. I find this highly unprofessional, and wonder if the authors David C Walls and Denise M Gosnell actually know anything about teaching. (One enormally teaches step 1 before step 2 where I come from - obviously not in America).
Anyway, later on in the book there is an example on creating a database.
My problem is that it does not work because I do not understand what is required in terms of security clearance / user names / passwords / user authority. (They also assume you know all about that too).
All I have done is installed MSDE 2000 Rel A and am now trying to use it. The only question I was asked during the install was to define a "Strong Password" and thats all.
I am now attempting to
1) Create a Database
2) Create a table with some fields
3) See if I can access the database
Now is that too much to ask ?
Here is the code that supposedly creates the database:
The problem is in the connect - something to do with security of some sort that is completely overlooked.
set oMSDEserver = CreateObject("SQLDMO.SQLServer")
set oDatabase = CreateObject("SQLDMO.Database")
set oDataFile = CreateObject("SQLDMO.DBFile")
set oLogFile = CreateObject("SQLDMO.LogFile")
oDatabase.Name = "scheduling"
oDataFile.Name = "sched_data"
oDataFile.PhysicalName = "c:\mssql7\data\sched_data.mdf"
oDataFile.Size = 5
oLogFile.Name = "sched_log"
oLogFile.PhysicalName = "c:\mssql7\data\sched_log.ldf"
oLogFile.Size = 3
oLogFile.MaximumSize = 50
oMSDEserver.connect "0kh2h","sa","" <<<<<< PROBLEM HERE
I have not done anymore than install MSDE and run this code - what steps have I missed please ???