Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a DataRow to Update Stored Procedure
Message
 
 
À
22/01/2010 07:15:46
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01445383
Message ID:
01445425
Vues:
29
>>>Hi, Dmitry, in SQL 2008 you can now pass an ADO.NET datatable to a stored proc.
>>>
>>>I don't know about a datarow (haven't tried it)...but worst case is you'd need to create a 1-row datatable.
>>
>>Hi Kevin,
>>I am using SQL 2005 for the project I am working on (per customer's spec). I guess I will have to 'manually' create a dataset/datatabe of 1 row and pass it to the stored procedure. Another idea I have is to create a ArrayList of pairs (column name and value) and pass it to the stored procedure. This way I can create somewhat a generic procedure for updating. But I don't know if ArrayList type can be read by stored procedure.
>>
>>Thank you.
>
>We only take the changes, bundle it into a datatable and update ... I believe the process also uses diffgrams..

Thank you for your input, John. Do I understand correctly that you populate a datatable of a dataset, right? (I thought that datatable cannot exist without a data set but I am not sure). But what you are doing is pretty much what I am trying to learn to do.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform