0

I have used SQL Server Management Studio to convert an Access file to SQL Server. I want to add this database to a project using C# (it appears in Server Explorer - Data Connections).

When I use C#, Solution Explorer - Properties - AddResource - Add Existing file I am required to navigate to the database file, but I cannot locate it.

Database is RWJ-PC.PaulsNewDatabase.dbo. Please advise if possible.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
RyszardJ
  • 39
  • 1
  • 1
  • 8
  • How have you used SSMS to convert an Access file to SQL Server? I didn't know such a thing was possible. Did you import data? – EllieK Jul 25 '17 at 18:27
  • Data was imported. I have description of how but too long to add to comments. How can I forward ? – RyszardJ Jul 26 '17 at 06:41

3 Answers3

0

Somewhere on your hard disk (or in a network folder)is a file with an extension of mdf. Attach the file to your SQL Server (using SQL Server Management Studio) instance and you will have a a database. SQL Server databases live on the file system as a mdf and (possible one or more ndf) file(s). It lives in memory and can be used when attached to a SQL Server instance.

benjamin moskovits
  • 5,261
  • 1
  • 12
  • 22
0

C:\ProgramFiles\MicrosoftSQLServer\MSSQL12.MSSQLServer\MSSQL\Data\Filename

Found eventually by trolling the internet

RyszardJ
  • 39
  • 1
  • 1
  • 8
-1

If you have imported the data into an instance of SQL server you can connect to the instance of SQL or to the mdf. Look here --

How do I connect to an MDF database file?

Search for connecting to SQL Server with C# (VB.Net). You can use Entity Frame work or connect directly.

EllieK
  • 259
  • 4
  • 14