--
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...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
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.
Marc
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Hey Marc,Thanks for the reply. We not sending the actual SQL commands over the line. we sending the info in such a way that way know which commands to execute on which parameters. Problem is our parameters are almost always Table Valued Parameters (TVP). and needs to sit in the request as DataTable properties. This is our problem protobuf-net cannot serialize DataTable type. It also has a problem with object type but i think setting DynamicType = true does the trick here as the types will always be primitive types. Am i correct? So we need some way to get these TVPs over the line using protobuf-net as serializer in WCF.Can you tell if byte[] can be declared as a ProtoMember. I can therefore use protobuf-net-data to serialize the DataTable object and assign the this byte[] ProtoMember. When it comes to assigning my TVP I can just Deserialize with protobuf-net-data again.I am looking for the fastest way I can do this as the sole reason we using this is that we love the performance of protobuf-net. If meaning we have to sacrifice the performance to serialize every single TVP we might as well revert back to DataContractSerializer which is definitely not what we want.I think also you suggestion regarding converting DataTable to a DTO will be difficult as we dont really know what the schema of the DataTable will be. I will have to think about this more.
Looking forward to hear from you.RegardsDesmond