473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Any help with store a file in a DB ?

I use VB .NET 2003 and I want to store into a binary field of a SqlServer
2003 table a File that I got on my hard disk.

Does anyone know how can I do that ?

I also use an OpenFileDialog component to get the file name and the path.
I got already a connection to my DB

and the only problem is that I don't know how to store the file into the
table ?
with the help of a variable first ? and then to insert it into the table in
a binary field ?

Nov 22 '05 #1
4 1339
Some good articles that may be able to help
http://www.netmag.co.uk/tutorials/de...bsectionid=176
http://www.csharpfriends.com/Article...?articleID=112

Sorry the articles are in C#. The concepts are the same, and the HTML parts
don't change at all.

Hope this helps,
--- Nick

"Rastarizer" <st******@taxydromiki.gr> wrote in message
news:uR*************@TK2MSFTNGP11.phx.gbl...
I use VB .NET 2003 and I want to store into a binary field of a SqlServer
2003 table a File that I got on my hard disk.

Does anyone know how can I do that ?

I also use an OpenFileDialog component to get the file name and the path.
I got already a connection to my DB

and the only problem is that I don't know how to store the file into the
table ?
with the help of a variable first ? and then to insert it into the table in a binary field ?

Nov 22 '05 #2
On Tue, 5 Oct 2004 14:11:32 +0300, "Rastarizer" <st******@taxydromiki.gr> wrote:

¤ I use VB .NET 2003 and I want to store into a binary field of a SqlServer
¤ 2003 table a File that I got on my hard disk.
¤
¤ Does anyone know how can I do that ?
¤
¤ I also use an OpenFileDialog component to get the file name and the path.
¤ I got already a connection to my DB
¤
¤ and the only problem is that I don't know how to store the file into the
¤ table ?
¤ with the help of a variable first ? and then to insert it into the table in
¤ a binary field ?

See the following:

How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET
http://support.microsoft.com/default...b;en-us;308042
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #3
Some good articles that may be able to help
http://www.netmag.co.uk/tutorials/de...bsectionid=176
http://www.csharpfriends.com/Article...?articleID=112

Sorry the articles are in C#. The concepts are the same, and the HTML parts
don't change at all.

Hope this helps,
--- Nick

"Rastarizer" <st******@taxydromiki.gr> wrote in message
news:uR*************@TK2MSFTNGP11.phx.gbl...
I use VB .NET 2003 and I want to store into a binary field of a SqlServer
2003 table a File that I got on my hard disk.

Does anyone know how can I do that ?

I also use an OpenFileDialog component to get the file name and the path.
I got already a connection to my DB

and the only problem is that I don't know how to store the file into the
table ?
with the help of a variable first ? and then to insert it into the table in a binary field ?

Nov 22 '05 #4
On Tue, 5 Oct 2004 14:11:32 +0300, "Rastarizer" <st******@taxydromiki.gr> wrote:

¤ I use VB .NET 2003 and I want to store into a binary field of a SqlServer
¤ 2003 table a File that I got on my hard disk.
¤
¤ Does anyone know how can I do that ?
¤
¤ I also use an OpenFileDialog component to get the file name and the path.
¤ I got already a connection to my DB
¤
¤ and the only problem is that I don't know how to store the file into the
¤ table ?
¤ with the help of a variable first ? and then to insert it into the table in
¤ a binary field ?

See the following:

How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET
http://support.microsoft.com/default...b;en-us;308042
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
0
by: Ivan Zuzak | last post by:
Hello. Sorry for crossposting, but i didn't have a better idea as to where to post the question. I'm using certificates to sign and encrypt SOAP messages, using WSE in .Net. I want to do the...
0
by: Michael Probst | last post by:
Hi all, I am new to .NET and the way XML data is handled in .NET I wrote a small application with .NET forms in C++ The application reads data from an XML file to fill-in the fields of the...
7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
7
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the...
6
by: Rudy | last post by:
Hello all! I am amazed how many posts I have read to store an image in SQL, and just as many against it. So I learned how to store an image in a SQL db and retrieve the image. A little tricky,...
17
by: homepricemaps | last post by:
hey folks, have a logic question for you. appreciate the help in advance. i am scraping 3 pieces of information from the html namely the food name , store name and price. and i am doing this...
1
by: Webstorm | last post by:
Hi, I hope someone can help me sort this out a bit, Im completely lost. Here is the page I am working on: http://www.knzbusinessbrokers.com/default.asp I have 3 search critera that I need to...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.