Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question - Strongly Typed DS
Message
 
À
17/10/2010 10:56:21
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01485576
Message ID:
01485881
Vues:
56
Bonnie,

Your critique of TableAdapters caught my eye. I understand (very little at this point in time as should be obvious) you object because it handles the connection. I am setting the connection string at startup as follows (csName is set from a textfile)
        Dim config As System.Configuration.Configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
        Dim csName As String = "b040.My.MySettings.b040_beConnectionString"
        Dim csSection As ConnectionStringsSection = config.ConnectionStrings

        csSection.ConnectionStrings.Remove(csName)
        Dim csSettings As New ConnectionStringSettings(csName, cConnString)
        csSection.ConnectionStrings.Add(csSettings)
        config.Save(ConfigurationSaveMode.Modified)
I don't know why, where or what, but I am aware that this must sound pretty blasphematory to you.

Just tell me if I am running into a wall with this assumption, and what the other caveats against da's are.

Thanks and kind regards,

Marc

>Bill,
>
>>Is there such a thing as a strongly typed datatable that's not part of a dataset?
>
>Not that I know of (unless you roll-your-own ... Google "strongly typed DataTable" and you'll find a Code Project link that does this).
>
>>I started out with untyped datatables and progressed to strongly typed datasets. Many obvious benefits there.
>
>I hope you're not using TableAdapters (which, unfortunately, get auto-generated now, unless you know the workaround). If you are ... I can post links to a couple of my blog entries that explain why TableAdapters are a nuisance and ways around it.
>
>~~Bonnie

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform