Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best DB To Use
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Divers
Thread ID:
01448575
Message ID:
01448665
Vues:
51
>>>>>>>I'm working on a small MS Access to C# WinForms conversion project. I have to decide which database to use. The client will most likely want to take the data home, so SQL will not be an easy option.
>>>>>>>
>>>>>>>I could do it in Access, which he knows and I hate, or I could do it in VFP, which I know. It's going to be one of these two, as I'm not
>>>>>>>interested in learning another DB at this point.
>>>>>>>
>>>>>>>I guess I'm just looking for thoughts....
>>>>>>
>>>>>>Why won't SQL be an easy option ? backup, restore at home. SQL Express is free.
>>>>>
>>>>>We're talking about someone who has never even HEARD of Sql. For us it;s a no brainer. To some people, an install wizard would panic them.
>>>>>
>>>>>He's already got to install my app. The database should be transparent.
>>>>
>>>>He should not have to know anything about SQL.
>>>>
>>>>Your app can control all SQL functions.
>>>
>>>He would have to install it. And how would he take his data home? With a file based DB he can just copy it.
>>
>>He can detach and attach the files (through your C# interface. Or, he can access the data remotely through port 1433 or a custom port. Or he can access it thorugh SSRS. Or he can subcribe over the web. Or he could just create a backup and restore it...
>>
>>And.. his memo file won't be invalid. And his index won't be missing or corrupt. And his table won't be corrupt. And his data will be securable. And ...
>
>
>Ok, I have decided on SQL Express. I can install it for him if needed.
>
>What I don't know is how to detach & reattach the data at a different location from within my C# app. Anyone wanna provide some input on this?

The easiest way is probably the backup and restore method. From your C# app you can send a BACKUP DATABASE command (books online will tell you the syntax). On the other end you can use the RESTORE DATABASE command to bring it in.

You can detach a database by sending a command from C# using the SP_DETACH_DB stored procedure. Reattaching is done with the CREATE DATABASE command (there is a FOR ATTACH option).

>
>What would also be nice is to have SQL Express installation as part of my app's install. Is this possible?

You can build the SQLEXPRESS package it into your install IIRC, but I've never done that. Hopefully someone else has some experience with that.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform