Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 28th, 2005, 06:28 AM
Authorized User
 
Join Date: Aug 2005
Location: vellore, t.n, India.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to harsh_hot
Default STORING IMAGES & EXPORTING SQLSERVER TABLES

hello everybody...
i am a fan of mysql...but now i am facing a problem...

the problem is whether i can store images in database or not...if yes how?
secondly..i wanna know whether sqlserver files(tables) can be imported to mysql or viceversa....tell me how if ans is yes..

i will be thankful to u

Reply With Quote
  #2 (permalink)  
Old September 1st, 2005, 06:06 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default


harsh_hot,

  your question about images comes up a lot; the short answer is, yes it is possible, but it is bad, for performance reasons, except for in certain rare circumstances. The way I would usually go about implementing this would be to store the image in the filesystem and store a pointer to the image (read:path) in the database.

That being said, if you really must do this, you can use a BLOB (Binary Large OBject) data type:

CREATE TABLE Images(
  ImageID INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
  Image_Name VARCHAR(128) NOT NULL,
  Image_Data MEDIUMBLOB NOT NULL
);


As for data from SQL Server, the files are not binary compatible, however you can get the MySQL ODBC driver (check out sourceforge if it didn't come w/ your distribution) and Data Transformation Services which is part of the MS SQL Server Enterprise Manager. Create a job that will copy tables from one database to the other -- it's pretty straight forward. Note that with the MySQL ODBC drivers on a windows machine, you can copy data to a MySQL process running on a UNIX.


Regards,
Meredith Shaebanyan

Reply With Quote
  #3 (permalink)  
Old September 8th, 2005, 02:10 AM
Authorized User
 
Join Date: Aug 2005
Location: vellore, t.n, India.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to harsh_hot
Default

Thanks a lot for your valuable information.....

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing images in Database and displaying them Manoj Bisht ASP.NET 1.x and 2.0 Application Design 4 February 6th, 2010 03:06 AM
Storing Images into database usprasad_m SQL Server 2000 4 May 17th, 2007 05:16 PM
Storing Images In Oracle & Manipulate Through VB 6 tutul128 Beginning VB 6 1 August 2nd, 2004 03:26 AM
Exporting reports with embedded images KARENM Access VBA 5 August 8th, 2003 10:39 AM



All times are GMT -4. The time now is 09:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.