none
help please RRS feed

  • Question

  •  

    Hey i downloaded Microsoft visual C# 2008 express edition i followed an offical tut and was near end and had to "add new data source" so i clicked it becuse it told me to on the offical tut i clicked the new connection as on the tut i was following picked my data source tut said keep it on the one it on Microsoft SQL server Compact 3.5 so i did then picked the database as northwind that cam with microsoft visual sam as the SQL then i test connection as it says on the TUT and it dosent work though it works on the tut i was following i get this msg Acces to the database file is not allowed. [ File name = C:\program Files\Microsfot SQL server compact Edition\3.5\samples\northwind.sdf
    also ive never used C# todays my first time so this hasent just happend at random ok please help here is a video soz for bad quailty

    http://www.youtube.com/watch?v=C-dck1g4vuI
    Saturday, January 26, 2008 3:47 PM

Answers

  • I think this is because on Vista, applications are not allowed access to C:\Program Files.

    Try copying (you probably wont be able to move) the northwind database file to another directory (like your project directory for example).

     

    * Edit - There should be two files, the database and the transaction log. Northwind and Northwind_log.

     

    The Express edition of Visual Studio does not allow 'normal' SQL Server connections, instead you must do it via the attach database file route (which is what you are doing). After copying the file elsewhere, you may get an error message from SQL saying that a database with that name already exists. Just change the name in the connection dialog.

     

    Saturday, January 26, 2008 6:12 PM

All replies

  • I think this is because on Vista, applications are not allowed access to C:\Program Files.

    Try copying (you probably wont be able to move) the northwind database file to another directory (like your project directory for example).

     

    * Edit - There should be two files, the database and the transaction log. Northwind and Northwind_log.

     

    The Express edition of Visual Studio does not allow 'normal' SQL Server connections, instead you must do it via the attach database file route (which is what you are doing). After copying the file elsewhere, you may get an error message from SQL saying that a database with that name already exists. Just change the name in the connection dialog.

     

    Saturday, January 26, 2008 6:12 PM
  • THANKS Big Smile it worked cheers man is there a way i can boost ur rep or somin o also soz for 3 posts it kept saying my msgs failed or somin

    so there may be 3 posts the same Stick out tongue

    Saturday, January 26, 2008 6:42 PM