Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL Server
Greetings,
 
I have a portfolio website at a discount ISP. I just replaced most of my Web Forms App with a nice MVC app. The ISP provides Access and MySQL(4.x) for free, so you can do some Db stuff, but working with anything MVC or ASP.Net default security is a hassle. It is $50 a month for SQL Server, but they really intend that for a business user. I don't know how many prospective employers have ever looked at this site, but I doubt it is many, so I cannot possibly see paying for that.
 
I was wondering. If you published the website, setting the references you need for SQL Server as Copy Local=True, do you think you could read the MDF data file? What references would you need? System.Data ... ?
 
Really, this is a bit over my head, but it would be great if I had a little SQL Server capability on my web site.
 
Thanks for any answers, Mike ... For that matter, thanks for the many answers over the years.
Posted 21-Apr-13 15:04pm
Comments
RedDK at 21-Apr-13 20:17pm
   
I've been thinking about that $50.00 for several years now ... addressing your problem though ... why not just stick the .mdf in afolder to which the user has read rights and let him take care of the rest of the details of getting info out of it?
Member 7980583 at 21-Apr-13 20:23pm
   
Well I want it available for basic ASP.Net Authentication and Authorization, which you can do without SQL Server, but it would be more convenient with it.
Plus, while MySQL can be used as a database, it's quite limited and does not greatly lend itself to Entity stuff (Yes there does seem to be an adapter available, but just more hassle and I get buried keeping track of configurations.) I'm getting more into MVC / LINQ and they want SQL Server.
... I think I understood your question. It is about my application using data in the MDF file, not a user having access to the file.
RedDK at 22-Apr-13 14:59pm
   
Absoultely. And the answer is size constraint.
 
At the moment.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You cannot read MDF file using C#. You can query meta data of the file but not the database data.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 130
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 27 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100