Questions tagged [mdf]

Master Database File (.MDF) is the starting point of a SQL Server database. It is the primary data file and also points to the other files in the database.

See the Wikipedia article on Microsoft SQL Server.

Related Tags:

429 questions
2
votes
3 answers

Program in WPF C# using .mdf database with LINQtoSQL freezes for a bit when I load the database

OK I have the following code that I run inside a button clicked event in order to compare the username and password given by the user. public static bool isAuthenticated(string Username, string Password) { //Open a connection with the…
GregoryGR
  • 23
  • 3
2
votes
1 answer

fill datagridview with content from .mdf

I am trying to fill a datagridview with content from a .mdf SQL Server database file (C# Windows Forms app)... private void Companies_Load(object sender, EventArgs e) { load_table(); } void load_table() { String DATA =…
Matej Merc
  • 227
  • 1
  • 6
  • 16
2
votes
0 answers

How to deploy C# exe with .Mdf file?

I have created windows application and i have created local database and added user name and password If username and password is correct then i have to open the code. I have generated a Setup.Msi , but when i try to install in my machine its…
2
votes
1 answer

Getting a local .mdf database to work with a WPF C# app using VS 2013 Express for Desktop

I'm developing an app that happens to have some records that need to be updated pretty often. I wanted to avoid deploying SQL Server on the client pc so I read a lot and thought a local .mdf file could be a solution (not so sure now if it's possible…
UnbiasedMilo
  • 35
  • 2
  • 9
2
votes
4 answers

Running sql scripts against an attached database?

I've got an MDF attached to an instance of Sql Server 2008 Express, and I need to run some sql scripts against it to generate tables, indexes, etc. But I can't figure out how to get this to work. If I load the scripts in Visual Studio, it only…
user1228
2
votes
2 answers

Release plan for my application on other machine by using .mdf file

I am using SQL server 2008 R2 and VS2010. I made simple application by using this tools. I attach database as .mdf in my application and deploy that application on other machine its works fine. Now if I plan for new release of my app which some…
2
votes
0 answers

Backup or Restore didnt work on mdf C#?

I'm trying to Backup and Restore my database with .MDF file in C#. I think it backup because I saw a .BAK file but when I restore, its not working. Both have no error on runtime but I think theres something wrong with my code. Here's my code: …
ViFer
  • 283
  • 1
  • 6
  • 23
2
votes
1 answer

MDF to CSV Conversion? Is it possible?

Is there a way I can convert my MDF database to a CSV for supported webhost? If so could anyone enlighten me on how?
Dezmen Ceo Sykes
  • 179
  • 1
  • 4
  • 16
2
votes
1 answer

.mdf files and cross-database querying?

I was wondering how I create a cross table query via C# when the databases are unattached (development) I know the .mdf files are temporarily attached to the database when you execute--but that's really the source of the confusion. If your DB…
Brian Rosamilia
  • 1,448
  • 14
  • 24
2
votes
1 answer

Creating .MDF With SQL 2008 EXPRESS/ Visual Web Developer 2008

I am trying to create a login function with SQL server 2008 express and Visual Web Developer 2008 Express. I tried Using a Login status and Login controll / Running the page without debugging and then attempting to login. I was told this would…
ModS
  • 806
  • 2
  • 15
  • 28
2
votes
3 answers

Importing a MDF file into SQL Server 2008?

I have inherited a VB.net web app that I'm making some changes on. I'm perfectly capable with the programming side (VB and MSSQL) but I'm getting lost with the tools. I was given a zip file of the code and everything. I opened the sln file in Visual…
DisgruntledGoat
  • 70,219
  • 68
  • 205
  • 290
2
votes
2 answers

Run SQL script on MDF file in App_Data

I have the following setup: Development: My own computer using an MDF file with a connectionstring which refers to my app_data folder. Production: An online server with its own SQL database When I want to create a new table / fields in my system,…
Lars Holdgaard
  • 9,496
  • 26
  • 102
  • 182
2
votes
2 answers

What i need to install on client pc for my .mdf database to work?

I developed an application in vs 2008, C#. Added the database in the project with add -> new item. (using SQL Server 2005) I took the connection string from app.config: Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Baza.mdf;Integrated…
Igor Mak
  • 21
  • 3
2
votes
2 answers

how to use an mdf in App_Data with shared hosting

If I create a website that uses an mdf in App_Data with the connection string: Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname; Trusted_Connection=Yes; what do I need to do to run the site in a shared hosting…
name
1
vote
3 answers

Do you have to have SQL Server installed on a machine if the connection string using is a path to a .mdf File?

I am wondering if you can use Linq to SQL using a .mdf file on a machine without a SQL Server instance installed?
David Basarab
  • 72,212
  • 42
  • 129
  • 156