0

I am using C# in Visual Studio to modify an ASP web application.

The application is currently using SQL Server as it's database. SQL Server is way overkill for this application. We're talking 1 table, maybe 40 - 50 records, with maybe 2 add/modify/delete transactions a week.

I'd like to get the client off SQL Server, as they're paying a hosting company for it. Is there anything in the .NET arsenal that would allow me to do this simple db handling? (The hosting company does not support MySQL or Postgres).

1
  • Thanks for your responses. I can't load anything on the SQL Server - the hosting company has control of the server and the only database they offer is SQL Server. That's why I was looking for solutions inside .NET. No other applications use the SQL Server. I am going to go with using XML. Thanks again. Commented Nov 3, 2009 at 14:58

5 Answers 5

5
  • Sql Server Express - free but will need to be installed on the host
  • XML - free but will require code changes
  • Sql Server Compact Edition - free and may run on the host because it doesn't need a client
  • Sql Lite - free and should run the same way as Sql Server Compact
Sign up to request clarification or add additional context in comments.

2 Comments

Although I like SQLite and Sql Server Compact Edition a lot, I still think straight object serialization best suits the OP's needs.
Opps, I tried typing my links in by hand, thanks for pointing that out.
4

I would use XML files. You can read and write to them. Here is an article from a quick google that will give you a start.

Comments

1

Frankly, I'd do the whole thing in memory. Maintain the data in some appropriate structure (an array of records, or an instance of some appropriately designed class). Whenever the memory structure is updated do a quick save to disk so that you can correctly initialize the structure if you have to restart the application.

To save to disk, I'd just serialize the memory structure if that's easy in C# (I assume there's a built in pickling mechanism) or translate it to XML, or CSV, or whatever is appropriate.

Comments

0

Are they also using that SQL Server for other perhaps larger applications? Then I wouldn't mess with it.

If what you are contracted to do will not make major changes to the database, I would not redesign a working db becasue you think it is overkill. Certainly not unless the client specifically requested you to do so. Redoing this to another database may introduce new bugs, do you really want to go down that route if you don't have to? Is the client (who is paying the bills) unhappy with the current situation?

Comments

-1

If the hosting company does not allow MySQL, why would they allow anything ?

I like SQLite, it is a single file DLL that creates and manages a database saved to a single file.

Also you might not need a db at all but rewriting the code to not use one will be tricky.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.