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
0
votes
0 answers

Getting error while trying to use .mdf file in Windows Forms

I am trying to use a .mdf file with Windows Forms but I'm getting an Error. This is my connection string: Data Source=(LocalDb)\v11.0;Initial Catalog=HospitalManagmentSystem;Integrated…
Anil Thakur
  • 75
  • 1
  • 8
0
votes
1 answer

Visual Studio 2015 provider when using .mdf

I'm working on a program that gets data from a database on an .mdf file and populates a listbox with the results. I'm getting an error that says "An OLE DB Provider was not specified in the ConnectionString." I can't seem to figure out what is the…
shrimppunk
  • 49
  • 6
0
votes
1 answer

Generating Script from MDF database

I have a mdf database file that I am using in my project with ADO.NET Entity Data Model. It is possible in Server Explorer to get a script file of the database by pressing: Data Connections => Tabels => [My table Name]Images =>Show Table Data =>…
Jake_2
  • 78
  • 15
0
votes
1 answer

Import and Export data mdf sqlserver

I have a localdatabase "office.mdf" I want my application to be able to export the database and import it again I tried to achieve that using backup query DB.ExecuteNonQuery(@"BACKUP DATABASE [" + Directory.GetCurrentDirectory() + @"\office.mdf]…
Rami ZK
  • 510
  • 3
  • 13
0
votes
0 answers

Getting wrong result in SQL Query Search using Vb.Net to find range of dates

My application screenshot with all records from table InvoiceRecords My Query: SELECT ID, Operator, [Invoice Number], Date, [Voucher Type], IncomingOutgoing, Amount, Incriment, Discriment, Month, Year FROM …
user7598312
0
votes
0 answers

Adding another data file on a separate hard drive Sql Server

I have ran into an issue with one of our Sql Server databases where we have hit a file size limit as the partition is Master Boot Record. We are currently at a little less than 2tb. Now I am looking for the best options and I think adding a 2nd data…
unreal
  • 53
  • 6
0
votes
0 answers

Error 916 when attaching an .mdf file in SSMS

I want to open an existing database from an .mdf file in SSMS but I am not able to attach it. It's giving the following error: The server principal "......" is not able to access the database "model" under the current security context. (.Net…
Surabhi Pandey
  • 4,058
  • 4
  • 18
  • 25
0
votes
1 answer

Connect VB.net to SQL Server Express mdf

I am very experienced with MS Access, but I am trying to transition to to VB.net and SQL Server. I am trying to build a multi-user database. The mdf file would be on some computer on the LAN, and each connected computer would have the application.…
devhl
  • 111
  • 1
  • 9
0
votes
1 answer

Cannot attach mdf file as database

I am using VS 2015 to create an ASP.NET MVC project and found the following error: Cannot attach the file 'F:\MINH\Documents\Visual Studio 2015\Projects\NailShop\NailShop\App_Data\NailShop.Models.TechnicianContext.mdf' as database…
Minh Pham
  • 275
  • 1
  • 13
0
votes
0 answers

Process started via IIS can't connect to local database (.mdf file)

So I am running IIS to eventually do a Process.Start(x) to run an application that I included in the App_Data folder. The issue is that the Application needs to connect to a .mdf file that is included in the App_Data Folder as well. When testing on…
Bitz
  • 1,128
  • 11
  • 33
0
votes
1 answer

SQL Server - Issue with UPDATE inside while loop in a function?

I have one table and I am willing to fill two columns with values generated using other column value using function. NOTE: I am working with a .mdf file in Visual Studio and not SQL Server. Like if EmployeeName is 'XYZ' then Password will be…
Nithin B
  • 601
  • 1
  • 9
  • 26
0
votes
2 answers

MDF File not Opening in SQL Server

My database file of SQL Server 2012 cannot be opened, it causes the following error. Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:903; actual 0:0). It occurred during a…
Fidha Nasher
  • 45
  • 2
  • 10
0
votes
1 answer

I need to Show the data from database into my gridview on aspx webform page

I want to fetch the data from the sql server database and show it into the gridview which i have created on my aspx webform page but it's not fetching it instead it's throwing an error that says **A field or property with the name 'Name' was not…
Kamal Singh
  • 99
  • 12
0
votes
1 answer

Set password for .mdf file in sqlserver

Set pssword for .mdf file in sqlserver. When you attach a file to someone, I want to ask him the password. In both cases, windows authorization and sqlserver authorization.
0
votes
2 answers

A downgrade path is not supported convert version 782 to 706 and earlier

I am creating one application where I have used ASP.NET MVC with Entity Framework 4.5.2 and trying to access the SQL Server but it gives me an error that I can't access any database so I just convert it to the single user mode. Now after converting…
3 rules
  • 1,359
  • 3
  • 26
  • 54