0

I recently had a website with a database setup using a .mdb file. I converted that over to a mysql database but noticed that there were several lines in the site that contained the following line:

Server.MapPath(@"..\_data\database.mdb")

Now I know this line maps the path to the database file but what I don't know is if this same function method will work now that I have a .sql file instead of a .mdb file. I was reading online that it wouldn't work. Initially I was just going to replace the database.mdb with the new .sql file I created which was database.sql. That would mean the new line would look like this:

Server.MapPath(@"..\_data\database.sql")

I was hoping someone could tell me if this would work and if not, what alternatives do I have to this line? Is there an equivalent version of this through some other function? The website is mainly coded using c# and asp.net. Any assistance is greatly appreciated. Thanks.

John123
  • 301
  • 3
  • 19
  • What is the content of this .SQL file?. Could you post more context around that line? A MySql database is opened using a specific connection string that doesn't include a filename – Steve Jul 07 '15 at 11:46
  • Why do you need to know the path to the database file? Location can be found in the my.ini file BTW. – PaulF Jul 07 '15 at 11:50
  • This gives more info : http://stackoverflow.com/questions/12947668/where-does-mysql-store-database-files-on-windows-and-what-is-the-name-of-the-fil – PaulF Jul 07 '15 at 11:55

0 Answers0