CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 1999
    Posts
    23

    c# and sql database

    It there a way to run a query on a sql server database without having sql server installed, i.e. just connect to the mdf file. It is possible to do this with an access database so was wondering if the same could be done with a sql database.

    Thanks.

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: c# and sql database

    Simple answer would be "No".
    Access database is different than a SQL Database.

  3. #3
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: c# and sql database

    Quote Originally Posted by Matthew.Cross
    It there a way to run a query on a sql server database without having sql server installed, i.e. just connect to the mdf file. It is possible to do this with an access database so was wondering if the same could be done with a sql database.

    Thanks.
    Your question is odd. As I understand you're going to get a Sql Server database file (*.mdf) from somewhere. You then want to run some queries against it. Right? I'm not sure what the context is here but it may benefit to read about SQL Server 2005 Compact Edition. This is a very light edition that does not need SQL Server. Basically it is a database file (*.sdf) with a few dlls that enable you to execute queries against your database. It has a small but useful subset of the full blown SQL Server 2005 or 2005 Express. If you don't need triggers, stored procedures, etc this could be worth considering...

  4. #4
    Join Date
    Jun 1999
    Posts
    23

    Re: c# and sql database

    Quote Originally Posted by nelo
    Your question is odd. As I understand you're going to get a Sql Server database file (*.mdf) from somewhere. You then want to run some queries against it. Right? I'm not sure what the context is here but it may benefit to read about SQL Server 2005 Compact Edition. This is a very light edition that does not need SQL Server. Basically it is a database file (*.sdf) with a few dlls that enable you to execute queries against your database. It has a small but useful subset of the full blown SQL Server 2005 or 2005 Express. If you don't need triggers, stored procedures, etc this could be worth considering...
    My colleague is developing a front end using sharepoint from which users can enter data via the web. These users can be anywhere in the world. This data is then stored in a sql database.

    I have written an app that needs to talk to 2 databases, sourcesafe and the sql database. My app can be run by all these users which again can be all around the world. So i would like to run queries on the sql database without having to install sql server on all the users PC's

  5. #5
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: c# and sql database

    Quote Originally Posted by Matthew.Cross
    I have written an app that needs to talk to 2 databases, sourcesafe and the sql database. My app can be run by all these users which again can be all around the world. So i would like to run queries on the sql database without having to install sql server on all the users PC's
    This makes lot of sense now. So your database would reside at one place and your application can be present at multiple locations, right?
    If this si the case then you do not need SQL Server installed on any of the Users' PCs. Just connect to the SQL Database that is present on one Server and then issue your queries. This is should work without any problem.

    The only condition here is that the SQL Server on which you want to execute your queries should be accessible from the PCs where your application is installed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured