Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 Discuss the book Beginning Microsoft SQL Server 2008 Programming, Robert Vieira, ISBN: 978-0-470-25701-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 18th, 2013, 12:03 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 5 Creating Database Files

I am having trouble creating my first database file. Here is the syntax used:

CREATE DATABASE Accounting
ON
(NAME = 'Accounting',
FILENAME = 'C:\Program Files\Microsoft SQL
SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\AccountingDat a.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5)

LOG ON
(NAME = 'AccountingLog',
FILENAME = 'C:\Program Files\Microsoft SQL
Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AccountingLog .ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB);

GO

And I get an error message when executed:

Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL
SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\AccountingDat a.mdf" failed with the operating system error 123(The filename, directory name, or volume label syntax is incorrect.).
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

I have double checked my file name path, I have removed spaces in the syntax, added underscores, and changed the folder from MSSQL10.SQLEXPRESS to MSSQL11.TSQLLAB as that is where my adventure works database is. I keep getting the same error and cannot figure out why this isn't working, when the directory path is correct and has been verified multiple times.

Can someone please help me figure out what I am missing?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Database - Chapter 3 jamesmont BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 10 August 18th, 2011 08:50 AM
Creating .exe files LandLocked Visual Basic 2010 General Discussion 2 September 27th, 2010 08:43 AM
creating read-only files Fat_and_immoral Excel VBA 4 December 20th, 2006 08:24 AM
Creating database and tables. chapter 9 PeterJB BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 August 1st, 2006 06:52 AM
Creating Files xchemicalbeatz VB.NET 2002/2003 Basics 6 April 14th, 2005 08:24 AM



All times are GMT -4. The time now is 05:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.