Does a new blank and empty SQL MDF file need anything in it like a carriage return?

Discussion in 'Databases' started by JEP_Dude, May 27, 2010.

  1. #1
    HELP!

    I'm still new with SQL. I got frustrated so I backed away from it for awhile. But that doesn't solve anything. So I'm back on the task.

    I tried to correct whatever the error was by creating a brand new version of the same SQL DB table. If I stated from scratch it should be easier to fix. ...Or so I thought. Now I get a new error just after I used WinXP Notepad to create a fresh and empty MDF file in the directory that I wanted.

    Yet when I used left clicked (LC) on "Data Sources" the Data Source Configuration Wizard opened. "Database" was selected so I LC the "Next" button. The second window of the Data Source Configuration Wizard opened with the title, "Choose your data connection" appeared. I LC on the button on the right titled, "New Connection...".

    The "Add Connection" window opened. I selected the second button on the right named, "Browse". Then I specified where P.mdf could be found.

    All was going well ... until I pressed the "Test Connection", instantly an welcomed and unfriendly message appeared. It said, ...

    "The operating system returned error 38(Reached the end of the file.) to SQL server during a read at offset 0000000000000000 in file 'C:\P.mdf'. Addition messages in SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; see SQL Server Books online.
    An attempt to attach an auto-named database for file C:\P.mdf failed. A DB with the same name already exists, or a specified file cannot be opened, or it is located on UNC share."

    Does a fresh new SQL MDF file need anything in it like a carriage return?

    Thanks in advance...

    May each of you have a blessed day as the Lord wills.

    JEP_Dude
     
    JEP_Dude, May 27, 2010 IP