Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Changes From A Dataset To The DB
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01306720
Message ID:
01306955
Vues:
3
>>>>>I have a method that receives a changed record as XML:
>>>>>
>>>>>
>>>>>public void UpdateUser(string sUserXML)
>>>>>{
>>>>>
>>>>>    StringReader oReader = new System.IO.StringReader(sUserXML);
>>>>>    DataSet oDataSet = new DataSet();
>>>>>    oDataSet.ReadXml(oReader);
>>>>>
>>>>>}
>>>>>
>>>>>
>>>>>How do I get the changes back to the database?
>>>>
>>>>The best answer depends on a few things.
>>>>Is the database MSSQL?
>>>>How did you obtain/create the original dataset?
>>>>Regards,
>>>>Viv
>>>
>>>
>>>1) The DB is MSSQL
>>>2) I am using the scenerio I described in past threads - a Client side class making a call through a WS
>>>which returns the data as XML. The XML is the reconverted back to a DS, changed, and passed back through
>>>the WS to the server AS XML, reconverted back to a DS as above.
>>
>>I see that Bonnie has (as usual) given a comprehensive answer. The only thing I would add is that, since you have no existing infrastrucuture, you might want to look at using Linq with DataContexts as an alternative. It may lack a little flexibility but is far, far simpler to implement.
>>
>>Regards,
>>Viv
>
>
>Hold on Viv, I think that what you have to do to abstract Linq, as your DAL, from your GUI is not easy at all. If they don't have a DAL in place yet then this is much BETTER.
>
>This is coming form trying to make a Linq DAL over most of last week.

Hi,
I agree that using a DataContext isn't likely to fit well with an existing DAL built on classic lines. And also that it's easy to let LINQ blur the seperation between layers (partly because it's very easy to use it without layers). But I'm not sure why you say it hard to use the Linq approach and stillmaintain seperation if you wish,
Regards,
Viv
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform