1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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

Discussion in 'C#' started by JEP_Dude, May 26, 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
    SEMrush
     
    JEP_Dude, May 26, 2010 IP
    SEMrush
  2. prptl709

    prptl709 Guest

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please explain it I don't know the MDF file in SQL.
     
    prptl709, Mar 1, 2011 IP
  3. yugolancer

    yugolancer Well-Known Member

    Messages:
    321
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    There is a hotfix for this problem.
    I forgot where i've read about this particular issue but i certainly know that there is a hotfix to be applied.
    Please google for it.
     
    yugolancer, May 5, 2011 IP