Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL Storage Question

Options
  • 25-06-2008 7:46pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    I'm writing an application in C# .NET and im wondering is there anyway of using a 'local' sql DB, i've seen it done before where the is a file called db.sql and theres nothing installed on the machine for sql, the file just can be copied and pasted on a new machine and the app will work, can anyone point me in the direction of info this please?
    Tagged:


Comments

  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Are you thinking of an app.config?

    What level of database infrastructure do you need?


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Being honest the only thing I can think of is the SQL Server Hosting toolkit

    Unless you are just using a plain text driver like http://www.indus-soft.com/SynametricsWebApp/WPTextFiles.jsp


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Do you know anything about sqlite? I see it works with C/C++ is there anything like it that will work with C#.NET?


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    I can think of some possibilities from what you describe. Often applications will bundle in SQL Server Express (which is free and redistributable). This basically give you a lite version of SQL Server on the machine you install to.

    The file db.sql probably contained the commands to create the database needed. The .sql extension generally indicates a file is a text file containing SQL commands. In this case I'd guess it contained the commands to create the needed database, tables etc on the instance of SQL Server Express installed with the application.

    The file possibly also was an actual database file, although these usually come with a .mdf extension. It's possible (through your connection string) to tell a SQL Server instance to connect directly to a database file and use that, as opposed to using a database permanently attached to the server. But again this requires SQL Server Express, or similar, to be installed.

    edit: in answer to your second question SQL Server Express works very well with C# :)


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Thanks for the advice guys, I'l look into SQL Server Express.


  • Advertisement
  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    I think SQL Server Compact Edition might be what you're looking for, from what I gather, it's a more stripped down, easily deployable version of the others;
    http://www.devx.com/dotnet/Article/33049


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    If you build an install project to go with your application you can add SQL 2005 as a prereq and ship it with your application. You can then also fire an installer command to build your database from scratch etc...

    Otherwise use a centralised db and have a connection string configurable by the installer.

    Or use ClickOnce deployment


Advertisement