LINQ to SQL without SQL Server

Discussion in 'Software' started by ShockTroop, May 19, 2008.

  1. ShockTroop

    ShockTroop Specialist

    I'm making a C# windows app that uses LINQ to SQL with a mapped local database (MDF file in the runtime directory). If I wanted to distribute it, anyone using it would need to have SQL Server installed. I know I could use an Access database and OLE DB syntax instead, or use Firebird or some other embedded database engine (VistaDB would seem like the best bet, but it's not free), but then I'd have to redo all the database code since LINQ to SQL doesn't work with them.

    Is there a free embedded SQL Server engine or something that would allow me to distribute a program using a local database file without the need to install SQL Server, or any server, yet I can still use LINQ to SQL?
     
  2. Wyatt_Earp

    Wyatt_Earp MajorGeek

  3. ShockTroop

    ShockTroop Specialist

    The DataContext they used must've had built-in connection parameters or something because it still complains about SQL Server not running (when it is I need additional keywords).
    I haven't tried the Compact Edition yet, but it would be nice to find an alternative that supports stored procedures and views, otherwise manual commands will be annoying and a bit less secure (not that security would be that big of an issue).
     
  4. Kodo

    Kodo SNATCHSQUATCH

    you need the SQL ENGINE to run the SQL queries against the database. Other than that, you can just do something like:

    MyDataBaseContext dbctx=new MyDataBaseContext(@"C:\PathToDb\databaseName.mdf");

    ...only if the SQL engine is available, however ;)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds