I need to know, how to write the INSERT-statement into a SQL-Script file.
When using the Query Analyzer from Microsoft's SQL Server 2000, I get an hex-formatted string as value of this image-column. When reading the value using VB6 and ADO, then it's returned as bytearray.
I already tried to write the raw data (bytearray) into script, but then it will be corrupted. And when I write the hex-fomatted string (I converted the bytearray to hex-string) it doesn't work either.
I also tried it with and without singlequotes.
But when I use the hex-string, I get an error from the SQL-Server, saying, that TEXT- is incompatible to IMAGE-datatype.
So what can I do to fix this problem. I don't have the choice to directly import the data into the database. Except using a new import-tool, but this is pretty too mch work for the time I have for fixing the bug.
You've closed your MemoryStreams but not Disposed them. Also you can replace this:
Dim strFilename As String = _
Dim strFilename As String = IO.Path.GetFileName(lblFilePath.Text)
This code doesn't work. We had a unit test that was testing the code and it has started to fail post 13th July 2005. I suspect a service pack installation or security change in .net imaging. See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=57655&SiteID=1