Upload a image and save it Mysql Database

Hi
I need to upload a image and save it in a Mysql database. I tried the upload component but i know a lot of things about this component except How can i upload a file.
Please help
mario
0
mario
5/28/2010 9:52:45 AM
embarcadero.delphi.database 1294 articles. 0 followers. Follow

3 Replies
1025 Views

Similar Articles

[PageSpeed] 5

Hello mario

> I need to upload a image and save it in a Mysql database.

The general approach to your issue:

Query1.Edit;
TBlobField(Query1.FieldByName('image')).LoadFromFile('....');
Query1.Post;

But depending on the data access components there 
may be a nuances.

-- 
With best regards,
Dmitry Arefiev
www.anydac.net - Firebird, MySQL, SQL Server, Oracle, PostgreSQL,
SQLite, ODBC (and more) high-speed native direct access components.
0
Dmitry
5/28/2010 12:38:17 PM
> {quote:title=Dmitry Arefiev wrote:}{quote}
> Hello mario
> 
> > I need to upload a image and save it in a Mysql database.
> 
> The general approach to your issue:
> 
> Query1.Edit;
> TBlobField(Query1.FieldByName('image')).LoadFromFile('....');
> Query1.Post;
> 
> But depending on the data access components there 
> may be a nuances.
> 
> -- 
> With best regards,


> Dmitry Arefiev
> www.anydac.net - Firebird, MySQL, SQL Server, Oracle, PostgreSQL,
> SQLite, ODBC (and more) high-speed native direct access components.

Hi Dmitry
My question is for Delphi for PhP, sorry I didn't made it clear in my question.
I try something like:

$this->tbutentes1->append();
    $this->tbutentes1->Fields(4)->LoadFromFile('c:\delphiphp\imagens\rapariga.jpg');
    $this->tbutentes1->post();

But it seems doesn't work
Any help?
Thank you
0
mario
5/28/2010 3:02:10 PM
> {quote:title=mario lopes wrote:}{quote}
> My question is for Delphi for PhP, sorry I didn't made it clear in my question.

It might be easier for you to get an answer then if you post your question in a Delphi for PHP forum, like the Database one here: https://forums.embarcadero.com/forum.jspa?forumID=98
0
Ken
6/10/2010 5:16:38 PM
Reply:

Similar Artilces:

Save Image in Database and read image from database
Hi, I've got a problem.I save a image in a database and try to read it again.It works great, but its very slow. Right now i know why, i make a small image from 100x75 pixels, but its still 3.1 MB !!!So thats why its kinda slow ;) But i don't know why its so slow?Can anyone help me? I get it from the database with this link:getImage.aspx?ID=34&thumbnail=110&p=hWith thumbnail i say he should be 110 pixels, and with p i say the height should be 110 ore the width should be 110, in the last case the h should be a w. My code for getImage.aspx:   System.Data.Sq...

upload image to MS Access database or SQL database
howto upload image, picture,files or binary into the MS Access database or SQL database? and how to read the image, picture, files or binary from the MS Access or SQL database? Anyone have any idea or sample script?Thanks & Regards--"Don't just always label good or bad about something, always have something is invisible from nude eyesight. " Below link could helps you for your question http://authors.aspalliance.com/das/insertimage.aspxSreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti Thank You sreedhark This also http://www.codeproject.com/aspnet/fileupload.a...

Save and retrieve images from mysql database
Hi everyone !, I need to save and retrieve images from the mysql database using asp.net with c#. Please help me elaborately with some examples.   Thanks in Advance,  J. Mohan...

How to attach a MySql database to a MySql database server.
Hi all, I have developed a web application in VS 2005, and it uses MySql 4.1 as database. Now, I have created the database and tables, and there is data in it. How can I copy this same database along with its tables and contents, to another server? Which all files should I copy? Is there any procedure to 'attach' a database? I use MySql  Manager to create databases and tables. Thanks Tomy Hi The best way to make a dump of your existsing MySql database is to use mysqldump utility which comes with any mysql server package. Here is a sample usage: "C:\Program File...

how to save image in "MySql" database?
hello, how to save image in "MySql" database in regards with C# (window application) as well as retrieve the same image.  please give me the code.   Ajmal Check out this article:http://www.codeproject.com/aspnet/image_asp.asp www.hopeasp.net...

Create a MySQL database from another MySQL database or Backup
I'm starting on a new ASP.NET project using MySQL as backend. While I'm familiar with SQL2k, I'm totally new in MySQL. Here's my questions: 1) Given a Web Server for installing the MySQL database, what do I need to start off? MyODBC and/or some other mySQL connector or console? I read tutorial mention Telnet or Shell access. What's that? I know how to create a FTP database in SQL2k. How's that done in MySQL? 2) Also given a backup of a MySQL database as data source and a remote MySQL database the backup was made from, what are the technical steps to create my first MySQL dat...

Are images stored in database or the path of the images is stored in database
In Ibuyspy store. Are images stored in database or the path of the images is stored in database ?HighOnCodingWanna get high! The image name is stored in the database e.g cart.gif. If I have seen further than others, it is by standing upon the shoulders of giants. Isaac Newton Hi, Is this a good idea to save the image name in the Database and the image in the Server's Folder. HighOnCodingWanna get high!  azamsharp wrote:Hi, Is this a good idea to save the image name in the Database and the image in the Server's Folder.Of course.It's a good idea.Otherwise the speed of&...

How to convert the database in a mysql database ???
I need help, i want to put asp.net portal to a mysql data base Good luck! Since the Data MAnipulation Layer is written in Stored Procedures, you will have to rewrite all of it. It probably would not be very time effective in my opinion. Well, maybe it won't be that bad. Looks like someone is already doing it. Check out their forum for more upates. http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=482434...

Save Image Path into Database, Retrieve Image Path by Particular Image ID and Display Image through Gridview
Hi All, Currently, I have a file upload control in my aspx page to allow user to upload images. When the user clicks the SAVE button, the image will be saved in a particular folder named 'PMap' that located within the website. What I am trying to do here is to direct all uploaded images into a common image folder (in this case 'PMap') and then, retrieve the images and displayed it through a Gridview according to its respective image id. I have managed to store all uploaded images into a common image folder, PMap. However, I hope advice can be given on my following pro...

Multiple Image upload with saving the filename to multiple columns in database?
Hey all, My goal is to have about 10 upload fields for images, after uploading to a local directory, i need to randomize the name of the file, and then insert the filenames into 10 different columns in the database row.. (Pic1, Pic2, etc..) I'm doing this in vb.net 2.0... the problem is i dont know where to start.. does anyone have any examples of what i want to do out there? Thanks in advance! Post free ads at http://www.floofie.com Hi, take a look at my previous posts under http://forums.asp.net/t/1079883.aspx This shows how to upload, resize and save an imag...

Possible for Image in database Visible only if image path exists in database?
I have an Access Database and i am using C#. I have a datagrid for a restaurant website that is populated by menu items. One of the Items is an image but not every item on the menu has an image. The ones that dont though come up with the little image placeholder like an image is supposed to be there. Does anybody know how I can make the image visible only if there is an image path stored in the database? //By the way, there are only 3 columns in the datagrid- the center column is populated by the Image, the Menu Item, and the Description of the Menu Item check out for 'helper functi...

How to upload image to server while saving the path in database for easy access?
I am trying to upload files to the server but save the file name into a database based on who is logged in so i can read the image files in seperate page.Any ideas? Steven Richardson   protected void btnUploadImage_Click(object sender, EventArgs e) { //--------------- Image Upload in a local folder ------------------ if (FileUpload1.PostedFile.FileName != "") { string strPath = Server.MapPath("./uploadfiles/"); string strFilename = FileUpload1.PostedFile.FileName; strFilename = P...

How to upload images to web directory (file system) and save its path to SQL database table
 Dear freinds, i want to know how to upload images to web directory and get its PATH to save the path in SQL database,  Thank you aliusmankhanC#.NET 3.5Web.DevAJAX http://www.codeproject.com/KB/aspnet/fileupload.aspx http://www.4guysfromrolla.com/webtech/091201-1.shtmlhttp://www.developer.com/net/asp/article.php/3097661 Amit Malhotrahttp://www.learnlinq.blogspot.com/  Thank you for the links... any one else have more information?aliusmankhanC#.NET 3.5Web.DevAJAX...

To change database from Acess into MySQL database
I want to change my database from Access to MYSQL . I can connect Ms Access database using the following syntax. Please let me know how I can connect mysql database same as that of access connectivity as given below [database] DBMS=ODBC DBParm = ConnectString='Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\testdata\employee.mdb;Uid=;Pwd=' AutoCommit=FALSE with thanks Polachan ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp This article should help: http://pbdj.sys-con.com/node/42600 You'll need to down...

Web resources about - Upload a image and save it Mysql Database - embarcadero.delphi.database

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Social Side of Code, Database CI and REST API Testing in Methods & Tools Winter 2015 issue
... for software developers, testers and project managers – has published its Winter 2015 issue that discusses the social side of code, database ...

Dodgy database exposes details of 191 million US voters
... years, there's a high chance that your personal details are now out in the wild. Security researcher Chris Vickery found a misconfigured database ...

Huge database of 191 million U.S. voters found on the open Internet
... such bulk information online, a recent discovery seems to indicate. According to VentureBeat , a security researcher found the exposed database ...

IDG Contributor Network: Shrinking an already ginormous SharePoint database transaction log
Last month, I wrote about how to avoid having ginormous transaction logs within SharePoint databases. But what if it’s too late, and your files ...

Massive Voter Database Left Open For Public Consumption
Gosh, we could have avoided all the angst about the Clinton/Sanders voter database breach if only we'd known about this major database , accessible ...

Database configuration issues expose 191 million voter records
A misconfigured database has led to the disclosure of 191 million voter records. The database, discovered by researcher Chris Vickery, doesn't ...

Botched database leaks records for 191 million voters
... sometime this century? If so, your personal info may be out in the open. Researcher Chris Vickery has discovered that a badly configured database ...

191 Million US Voter Registration Records Leaked In Mystery Database
A huge database of 191 million US citizens is uncovered. But no one knows who carelessly left it open, whilst the FBI have been contacted.

Resources last updated: 1/17/2016 3:20:15 PM