Dear all,
Can any one provide me a sample source regarding saving and retrieving
binary files in MSSQL 2005. I have try it but I found that it only insert
the first element of that byte array that I read from file to table.
I was using Microsoft Data Access Application Block version 2 SQLhelper
to done the execution portion.
ThanksHi
The text, ntext and image data types have successors: varbinary(max),
varchar(max) and nvarchar(max).
Those can be addressed like normal char and binary columns, no need to chunk
the data in.
Application Blocks 2 don't support he new datatypes as it is still a .NET
1.1 application.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Goh" <goh@.noemail.noemail> wrote in message
news:utOmXEv%23FHA.2036@.TK2MSFTNGP14.phx.gbl...
> Dear all,
> Can any one provide me a sample source regarding saving and retrieving
> binary files in MSSQL 2005. I have try it but I found that it only insert
> the first element of that byte array that I read from file to table.
> I was using Microsoft Data Access Application Block version 2 SQLhelper
> to done the execution portion.
> Thanks
>
>|||Hello,
Did you try this code?
byte[] mmfbBlob;
SqlParameter Parameter1 = new SqlParameter("@.mmfbBlobThumb",
SqlDbType.Image);
Parameter1.Value = mmfbBlob;
Since the issue is related ADO.net, my suggestion is that you go there
since you could obtain most qualified answers there:
microsoft.public.dotnet.framework.adonet
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>From: "Goh" <goh@.noemail.noemail>
>Subject: Saving and Retrieving Binary Files in MSSQL 2005
>Date: Wed, 7 Dec 2005 13:42:56 +0800
>Keywords: Saving and Retrieving Binary Files in MSSQL 2005
>Lines: 13
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>X-RFC2646: Format=Flowed; Original
>Message-ID: <utOmXEv#FHA.2036@.TK2MSFTNGP14.phx.gbl>
>Newsgroups: microsoft.public.sqlserver.programming
>NNTP-Posting-Host: tm.net.my 60.49.6.190
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.programming:566803
>X-Tomcat-NG: microsoft.public.sqlserver.programming
>Dear all,
> Can any one provide me a sample source regarding saving and retrieving
>binary files in MSSQL 2005. I have try it but I found that it only insert
>the first element of that byte array that I read from file to table.
> I was using Microsoft Data Access Application Block version 2 SQLhelper
>to done the execution portion.
>Thanks
>
>|||http://spaces.msn.com/members/staceyw/Blog/cns!1pnsZpX0fPvDxLKC6rAAhLsQ!404.
entry
William Stacey [MVP]
"Goh" <goh@.noemail.noemail> wrote in message
news:utOmXEv%23FHA.2036@.TK2MSFTNGP14.phx.gbl...
> Dear all,
> Can any one provide me a sample source regarding saving and retrieving
> binary files in MSSQL 2005. I have try it but I found that it only insert
> the first element of that byte array that I read from file to table.
> I was using Microsoft Data Access Application Block version 2 SQLhelper
> to done the execution portion.
> Thanks
>
>
Showing posts with label binary. Show all posts
Showing posts with label binary. Show all posts
Friday, March 23, 2012
saving and retreivig the files on sqlserver
Hi!
I want to save and retreive some files on sqlserver. I want to save the files in binary format on sqlserver and I want to get back them in their format.Is it possible in c#? If possible please help me to do this. I already succeeded to save a file in binary format, but i am getting problem to retreive that in its format.
Thanks in adance
Fro Exmple, to save Image Files in Sql Server...
Inserting Images to SqlServer in ASP .NET: ASP Alliance
Retrieving Images from SqlServer in ASP .NET: ASP Alliance
Excellent Tutorial regarding storing / retriving files on server as well as in database:Storing Uploaded Files in a Database or in the File System with ASP.NET 2.0
hope it helps./.
Subscribe to:
Posts (Atom)