473,799 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1359
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******@taxyd romiki.gr> wrote in message
news:uR******** *****@TK2MSFTNG P11.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******@taxyd romiki.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******@amerit ech.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******@taxyd romiki.gr> wrote in message
news:uR******** *****@TK2MSFTNG P11.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******@taxyd romiki.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******@amerit ech.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
4965
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 webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or anything...it just returns a "1" (whereas it should return a "0") as far as I can tell. I have read the PHP...
0
2461
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 following: 1) Generate a certificate to the system store. 2) Export the certificate from 1) to a file with only the public key, and then import the file as a certificate into the system store, but on another computer. 3) Export the certificate from...
0
1082
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 form. This works fine but when I try to add new data to the XML file it does not comply with the XML schema file I am using.
7
5988
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 are like a root directory for a target program on the user's machine my app uses, which they would be prompted to supply at startup. Normally the registry is used for this but I'd rather not use the registry if possible. Isn't there some kind of...
0
3944
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. It is almost like it is trying to implement it's own COM interfaces... below is the header, and a link to the dll+code: Zip file with header, example, and DLL:...
7
2921
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 database into classes, which are used throughout the application. I have made class collections which, upon reading from the DB, create an instance of the class and store the DB values in there temporarily. My problem is that if user1 looks at...
6
1919
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, but not too bad. But then I thought I wanted to try the other way, by putting the file location in SQL and storing the actual image in another directory. I plan to have many images on my web application, up to as many as 5000. Not to mention the...
17
1416
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 for many different food items found ni the html including pizza, burgers, fries etc. what i want is to write out to a text file in the following order: pizza, pizza hut, 3.00
1
2804
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 use when querying the database. Right now it is only looking for a match on one of those dropdowns and not all 3. can anyone help? Here is the code: <form BOTID="0" METHOD="POST" action="businessforsale_interface/Results/test3.asp">
5
13386
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 http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10484
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.