none
An attempt was made to load a program with an incorrect format RRS feed

  • Question

  • I have a problem trying to make sql express working. I installed SQL Server 2005 Express Edition, SQL Management Studio Express, Visual Web Developer 2008 Express Edition.

     

    When I try to connect to sql database file (northwind.mdf) located in App_Data folder of my test website I get the following exception:

     

    An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

     

    I can create a new database through SQL Management Studio, but when I try to create new table I get the same error. I tried to google this error message but did not find anything useful. I tried to reinstall .NET framework 2.0, Visual Studio, SQL Server, also I tried to use Visual Studio 2005 Express Edition. Nothing helped, error is still the same. I even tried to use SQL Server 2005 64-bit edition, it did not help, error is still the same.

     

    My computer is the following:

    AMD Sempron 2500+, 1Gb Ram, Physical Address Extension, WinXP SP2

     

    What is the reason for this error? How to make sql express working?

    Sunday, January 13, 2008 7:28 PM

Answers

  • Your first link is confusing because it implied there is SQL Server Express 64bits but there is no such product, what you see is an MSI that let you install the SQL Server Express which is a 32bits application server in 64bits boxes because developers could not install the 32bits binaries in WOW64 in 64bits operating system.

     

    I noticed you said northwind.mbd that is not a SQL Server file SQL Server is MDF,LDF, NDF so you need to go to the folder below and verify as I said in my previous post the you have northwind.mdf.  It is very important Access is a database sold by Microsoft but it is not related to SQL Server. Check the links below for Microsoft telling you there is not 64bits Express.

     

    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

     

    http://www.microsoft.com/downloads/details.aspx?FamilyId=220549b5-0b07-4448-8848-dcc397514b41&displaylang=en

    http://technet.microsoft.com/en-us/library/ms345154.aspx

     

    Tuesday, January 15, 2008 4:17 PM

All replies

  • Check if this is your case

     

    http://support.microsoft.com/kb/928208/en-us

    Monday, January 14, 2008 11:24 AM
    Moderator
  • Thank you for response. When I was googling this problem I found this KB article too, the error message described there is the same, but symptoms are different: I do not use any macros. Maybe VisualStudio or SQL Management Studio does it internally. Also solution offered in that KB article is to "contact Microsoft Product Support Services to obtain the hotfix", they even do not allow to download it Sad

     

    Maybe someone else experienced this issue and knows how to resolve it?

    Monday, January 14, 2008 1:50 PM
  • Try the thread below for your problem, I am assuming you are in mixed development environment so you have to run everything in WOW64 directory in your XP if it is X64 XP.  The reason is VS2005/8 is 32bits so you need to configure IIS5 to run in 32bits mode. The issue is explained by Microsoft in the thread below.

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1244169&SiteID=1


    http://blogs.technet.com/mbaher/archive/2006/12/17/running-iis-32-bit-applications-on-iis-64-bit.aspx

     

     

    Tuesday, January 15, 2008 1:19 AM
  • Thank you for the good link, but I have slightly different problem. I do not have problems with any of my programms/assemblies/websites. I have a problem with SQL Express.

     

    For example I can browse existing databases using SQL Management Studio, I can create a new database, but when I try to create a new table I get this error. Also I get this error when I try to add a new database connection in Visual Studio's Database Explorer, I specify all the properties, click "Test Connection" which tells me that connection was tested successfully but after I click "Add" button it tells me "unable to add connection because of this error".

     

    Computer's processor is Sempron 2500+ on a 754 socket. It should be 64-bit, but I use Windows XP Home Edition 32-bit operation system, 32 bit edition of SQL Server Express and Visual Studio.

     

    I do not have IIS; websites run on local development server which is shipped with Visual Studio, so I can not change any setting in there.

     

    Also it is very strange that I can install SQL Express 64-bit edition, but can not install Management Studio 64-bit edition (installer tells me that I have incompatible hardware)

     

    I can try to use that corflags.exe tool to force SQL Server's executable run in 32-bit mode, but it looks a very weird solution for me. Why do I install a 32-bit version of SQL Server and then force it to be 32-bit with a special tool?

    Tuesday, January 15, 2008 2:58 PM
  • I don't think you should be developing web application in an operating system without IIS and there is no 64bits SQL Server Express I still answer questions at the SQL Server Express forum and you will see there is only 32bits.  There is no need to use corflags.exe on SQL Server because everything except your CPU is 32bits.  Rerun setup for VS and SQL Server and repair your install.  And are you sure you have Northwind MDF in your data subfolder in Microsoft SQL Server folder in programs?  The reason I am asking Northwind you download is for SQL Server 2000 which means you need to attach with code.  There are code to do the attach form previous SQL Server online or in the BOL.

     

    Tuesday, January 15, 2008 3:14 PM
  • On this page (at the very bottom of it) you can find 64-bit edition of SQL Express:

    http://msdn2.microsoft.com/en-us/express/bb410792.aspx

     

    This is a direct link to setup file:

    http://go.microsoft.com/fwlink/?LinkID=83387

     

    I tried to reinstall: SQL Server (both 32-bit and 64-bit versions), Visual Studio (tried both 2005 and 2008), .NET Framework 2.0. Nothing helped.

     

    I can not tell exactly if Northwind DB is a 2005 version, I will come home and check it, but in any case I should be able to create databases and tables through Management Studio and I can not do it because of error, so this error is not related to Northwind.mdb version.

    Tuesday, January 15, 2008 3:31 PM
  • Your first link is confusing because it implied there is SQL Server Express 64bits but there is no such product, what you see is an MSI that let you install the SQL Server Express which is a 32bits application server in 64bits boxes because developers could not install the 32bits binaries in WOW64 in 64bits operating system.

     

    I noticed you said northwind.mbd that is not a SQL Server file SQL Server is MDF,LDF, NDF so you need to go to the folder below and verify as I said in my previous post the you have northwind.mdf.  It is very important Access is a database sold by Microsoft but it is not related to SQL Server. Check the links below for Microsoft telling you there is not 64bits Express.

     

    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

     

    http://www.microsoft.com/downloads/details.aspx?FamilyId=220549b5-0b07-4448-8848-dcc397514b41&displaylang=en

    http://technet.microsoft.com/en-us/library/ms345154.aspx

     

    Tuesday, January 15, 2008 4:17 PM
  • OK, at least some good news: I don't have to reinstall SQL Server again to get back to 32-bit version Smile

     

    Tonight I will attach that Northwind database and see if it makes a difference.

    Tuesday, January 15, 2008 4:40 PM