creating .mdf in ASP

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

I've been writing Windows apps for years now but to become familiar with
web apps I'm working my way through some instructions to build a web
site using a SQL database. The instructions assume I'm using VB Express
but I'm using VB 2005 pro. I ran into a problem when the instructions
said to right click on App_Data in the Solution Explorer and add a new
SQL database item. I got the following error:

Connections to SQL Server files(*.mdf) require SQL Server Express 2005
to function properly.

I do have SQL Server Express 2005 on my pc, it is running and I can use
SQL Server Management Studio Express to connect to it.

I think the problem comes from the fact many of my windows apps use our
production SQL Server 2000 database in the computer room. I expect that
the production system is being seen as the default SQL Server by my pc
and consequently the web app is trying to connect to it to create the
database. I think I should be able to choose which server the database
is created in somehow. Do you have any idea how I can force the web app
to look at my pc's SQL Server Express?
 
Which is the technology you would prefer to use... SQL Server or MDF?

Use the App_Data folder you can create a connection (and database)
using Access as your backend (.mdf)

If you open server explorer and right click on data connections you
can create a new SQL database. The two things are entirely seperate
from one another.
 
Charlie Brown,

SQL Server 2005 uses .mdf files to hold databases. Access uses .mdb files
for the same purpose.

Kerry Moorman
 
I stand corrected, Thank you.

To the OP: Try using the Data Sources tab to create a new data source
if you haven't already. That should allow you to choose the server to
which you want to connnect.
 
This problem seems to be that although SQL Server Management Studio
Express can connect and create a DB in SQL Server Express 2005 nothing
else can connect to it--including VB. I've been Googling and searching
but can't figure out how to get it to work.
 
Back
Top