Ooh, the idea of allowing SQL over a service boundary sends all kinds of
shivers up my back, and not the good kind of shivers. On your head be it,
but: I wouldn't do that myself.
I once did some experimental datatable serialisation code - it isn't in the
release binary, but it is still inside the solution; but: I really can't
say how robust this would be, and you'd need to serialize it manually and
store it in a byte. Of course, by the time you've done all that you might
as well have simply asked the datatable to serialize itself using its own
internal storage format (make sure you switch from XML to binary) - and
again: shove it in a byte member. IIRC you can set the RemotingFormat and
use BinaryFormatter to get the internal binary storage format.
On 10 Jul 2014 19:56, "Desmond Davids" <deme...@gmail.com> wrote:
> Hey Marc,
> I know this is an old article. but i need to ask you something regarding
> We have a WCF service which we use to execute SqlCommands to our DB. We
> send Commands with DataContractSerialization. I came across protobuf-net
> and I have converted my WCF service to use protobuf. We now sit with a
> problem. we use table valued parameters in our sqlcommands. which means we
> need to serialize DataTables as part of an object. I there a way we can
> achieve this with protobuf.
> Do you have any workaround/alternative or suggestion?
> Desmond Davids
> On Friday, 16 July 2010 08:00:25 UTC+2, Marc Gravell wrote:
>> From the message, that *sounds* like protobuf-net...
>> There is no built-in handling of this, but it is possibly something that
>> could be added, especially in "v2" which has a much more flexible model.
>> For example, you *could* argue that there is an implicit schema that uses a
>> repeated element per row, and the column ordinal for a field.
>> There are a couple of points here thought:
>> - protobuf /normally/ doesn't include schema information; so when
>> deserializing *either* you would have to set up the schema (columns etc)
>> *first* and then use Merge, /or/ I could include schema information as an
>> - it would need some thought re the difference between DataSet and
>> DataTable - a data-set has relations etc, which don't necessarily fit very
>> well here
>> I'm interested in your thoughts with this; are you just after something
>> to load/save the data? Or interop with other platforms?
>> And the other important question: /an option/ is to move the data to/from
>> a DTO during serialization; the DTO would serialize fine with protobuf-net.
>> On 15 July 2010 09:43, Ferryandi Chai <fjch...@gmail.com> wrote:
>>> Hi All,
>>> Im just wondering can protobuf serialize datatable.
>>> Im a c# developer, and when i tried to serialize datatable it prompt
>>> this error:
>>> "Only data-contract classes (and lists/arrays of such) can be
>>> processed (error processing DataTable)"
>>> Tried to google this problem but cannot find solutions.
>>> You received this message because you are subscribed to the Google
>>> Groups "Protocol Buffers" group.
>>> To post to this group, send email to prot...@googlegroups.com.
>>> To unsubscribe from this group, send email to protobuf+u...@
>>> For more options, visit this group at http://groups.google.com/
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to firstname.lastname@example.org.
> Visit this group at http://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.