What's the difference between having an mdb file in a folder in solution explorer in VS and having the mdb file in SQL server?

 Hi,

 I have always had my mdb file in sql server and been able to use it just fine without having it in a datafolder in vs. But, a lot of the times when I downloaded a sample for instance, the sample comes with the mdb file in the datafolder. What's the difference between having an mdb file in a folder in solution explorer in VS and having the mdb file in SQL server? And can it work if it's in VS and not in SQL server?

 

Cheers, 

E

0
Ennair
8/26/2008 9:10:26 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

4 Replies
1290 Views

Similar Articles

[PageSpeed] 16

Hi, there isnt much of a difference except that the data file is attached to SQL server at runtime where the other scenario already has the database attached prior to that.

Like you said, it is the case with a lot of samples because it is easier to distribute. Also if you have SQL express installed but not the management studio, then you can manage your database through Visual studio. I've always gone for the option to not have it in my data folder but I guess both ways work equally well.

The only problem comes in if you need other websites/applications to access the same database.



Please remember to mark this post as an [Answer] if you found it helpful.
0
StefanPienaar
8/26/2008 9:21:56 AM

 Do you mean it's only attached to SQL server at runtime and not on other times? Is there an interface such as SQL Management Studio for the express version. I can't get VS to manage my database anymore after I installed an Oracle provider for Oracle database.

 

0
Ennair
8/26/2008 10:04:06 AM

Hi, yes, only at runtime.

There is a free version of Management Studio for SQL Express. You can find it here:

http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en



Please remember to mark this post as an [Answer] if you found it helpful.
0
StefanPienaar
8/26/2008 10:07:09 AM

Hi,

In For more information about the AttachDBFilename and User Instances, please refer to the following document.

SQL Server 2005 Express Edition User Instances
http://msdn.microsoft.com/en-us/library/bb264564.aspx


Jian Kang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jian
8/29/2008 7:36:01 AM
Reply:

Similar Artilces:

SQL Server Database File vs SQL Server Database -VWD Express
VWD Express 2008, SQL Server Express 2005. I have been using SQL Server Express with ASP and VB for some years - I just create a DB in Management Studio Express, have SQL Server set to 'SQL Server and Windows authentication', and use a connection string with 'sa' and a password (I never have managed to get it working with 'integrated security', but that is probably irrelevant to this post). So I have a list of DB's attached to SQL Server that I can see, attach, detach etc in MSE. I am getting started with .NET. Working through a VWD Express book tutori...

sql server 2005 do'nt attach sql server database file
I have sql server 2005 standard version. I want connect mu database file with microsoft sql server  database file.I receive ... provider: SQL Network Interface; error: 26 - error locating server/instance specified ... error.How to use local .mdf file with sql server 2005 (not express)  SQL Server (not express) doesn't support attaching on the fly of mdf files, so you need to do it manually. That is, open SQL Management Studio, right click the server, select attach, and that way you can permanently attach the database to the server. You'll have to use a normal connection s...

SQL Server Express file to Sql Server
I would like to copy the schema and data of a sql server express database file to a SQL Server Database. How can this be done and what steps would I need to take?   Thanks for any helpTinyPond TinyPond:I would like to copy the schema and data of a sql server express database file to a SQL Server Database. How can this be done and what steps would I need to take? If you have Express Management Studio, you back backup your database, and them import it to SQL Server (or attach and reattach).Justs open SQL Server Express Management Studio, connect to your Express instanc...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi,Basically i built a webpage with Login and it's working well from my local machine.Right now, i'm using Database Publishing Wizard. the problem is how do i convert.MDF files to .SQL 2005 to get my database publish in the internet? thanks  Place your .MDF file in the App_Data directory, change the connection string accordingly and then publish your web site. ----------------------------------------------------------Please click Mark As Answer if this helped in solving your problem.  Please click "Mark As Answer" if this hepled in solving your problem. ...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi (and HELP!),   I downloaded the Personal WebSite Starter Kit and got it working no problem on my local machine.  But I've had nothing but frustration trying to get it up and running on a webhosting site.  I picked hostmysite.com which uses SQL Server 2005.  I was under the impression that it wouldn't be that big a deal to convert the .MDF files that Sql Server Express uses to a SQL Server 2005 database.  I tried using SQL Server Management Studio Express.  I was able to "see" my remote database on hostmysite.com, but I was not able to import the .mdf file...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi (and HELP!),   I downloaded the Personal WebSite Starter Kit and got it working no problem on my local machine.  But I've had nothing but frustration trying to get it up and running on a webhosting site.  I picked hostmysite.com which uses SQL Server 2005.  I was under the impression that it wouldn't be that big a deal to convert the .MDF files that Sql Server Express uses to a SQL Server 2005 database.  I tried using SQL Server Management Studio Express.  I was able to "see" my remote database on hostmysite.com, but I was not able to import the .mdf files ...

Is is possible to run a .SQL file on SQL Server without converting file contents to a string?
Is it possible to run a .SQL file without converting the contents of the file to a string and then executing the string? Is it possible to run or execute the file? Thanks You can use the .sql file as an input file to ISQL using the -i switch "Kevin Wiebe" <kevin.wiebe@riseinc.com> wrote in message news:BjSh5G7GCHA.196@forums.sybase.com... > Is it possible to run a .SQL file without converting the contents of the > file to a string and then executing the string? Is it possible to run or > execute the file? > Thanks > > ...

Sql Server Script File(.sql) Execution by Vb.net Code
I have a problem. I m working on "light weight sql server"  project.   and i want to execute .sql file through vb.net code with the help of sqldmo library and sqlns namespace. but i donot know any method to directly execute the .sql file. i am successfully making the full script of select database of sql server.   please help me.... thanks.... Hi, You can use SQL-DMO object in your .net projects by referencing Sqldmo.dll  file which is in  C:\Program Files\Microsoft SQL Server\80\Tools\Binn  folder is default installation parameters are used. I...

ms sql mdf database file attached vs created on sql server
 Hi allI have a question concerning sql database mdf files. In the old days I would user a ms access database. This file would be stored with the actual web files and would utilise a dsn connection. I have noted when designing with vwd 2005 express it allows you to use 2 methods of creating a mdf database. You can either create it as an attachment mdf or you can create it directly using sql manager. My question is, if you create the mdf database as an attachement file can you store it in the same manner as if you where using a ms access database, meaning can you store it with the w...

Loading data from .mdb file into sql server 2005
I am so new to SQL Server 2005 and just studying.  Saying that... We use SQL Server 2005 Express edition.  Some one sent me a file (info.mdb) and asked me to load the data in this file in to a table called Products and also asked me to load in another table (ProdCat) where id = 'X05'. So being not knowing anyting regarding data loading etc, how should I do this and proceed?  The .mdb means its a Access database file?  If that is the case, I dont have Access in my machine and what should I do? I'm not sure if Sql Server Express has this functionality or not...

how to save file (stored on SQL server) to file/web server?
Hi Experts, I got files stored on SQL server db. I would like to be able to save them onto file/web server. I know how to retrieve them, but not sure how to save to file/web server. Please help. Thanks so much. Below are codes for retrieving file info from sql server:Dim strFileName As String = Quote.GetQuoteFileByQuoteFileID(CInt(selectedQuoteFileID)).Tables(0).Rows(0).Item("QuoteFileName")Dim strFileType As String = Quote.GetQuoteFileByQuoteFileID(CInt(selectedQuoteFileID)).Tables(0).Rows(0).Item("QuoteFileType")Dim strFileSize As Integer = Quote.GetQuoteFileByQuoteFileID(CInt(selectedQ...

SQL Server 05 & .NET .dll's: executing .dll from T-SQL
Can I manually execute a .dll stored in SQL Server 2005?Is it possible for this .dll to do anything: call a Web Service, process XML, etc?Thanks. ...

SQL Attached mdf database files VS database imported into or created in SQL Server 2005
 Hi all (newbie @ asp.net)(oldie @ ASP 3)What is the purpose of using an attached MDF database files in the App_Data folder on a web site as to importing it into the SQL server directly or creating it on the SQL server. Does a mdf database attached file purely use the SQL server as a connection interface.Is it something similiar to DSN(ODBC) Connections for ms access databases. AFAIK it is only for deployment conveniance, I have always imported the database directly into SQL Server and set up the connection string accordingly.Don't forget to click "Mark as Answer" on the...

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my vb.net application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an asp.net application. I'm using vb.net as the codebehind. I'm a...

Web resources about - What's the difference between having an mdb file in a folder in solution explorer in VS and having the mdb file in SQL server? - asp.net.sql-datasource

Resources last updated: 12/18/2015 8:05:10 PM