Hi Duncan, Thanks for the reply,
Yes, that's precisely what i want to do, i kind of tried this approach, though i tried it with varbinary sql types and the data wasn't being written to sql, though it was going through our data wrapper classes before hitting sql, so there may have been a problem there. I'll try again with a simple test, without going through our data stuff... Thanks Wayne -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Duncan Smart Sent: 24 April 2002 18:33 To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Serializing to SQL Table Do you want to serialise the whole object to a binary field? If so, you can serialize to a MemoryStream, then you can convert this to a byte[] using ToArray() -- this byte[] can then be used as a Parameter for an SQL INSERT statement (use something like command.Parameters.Add ("MyBlobField", myByteArray)) HTH, Duncan Smart ============ On Tue, 23 Apr 2002 08:46:00 +0100, Wayne Enis <[EMAIL PROTECTED]> wrote: >I can successfully serialize my object to a file (binary mode), can any one >give me any pointers for serializing to SQL2000. > >Thanks > >Wayne > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.