cbdrako99
asked on
How to Convert 1000's of BLOBs to Image Files
Hello Experts,
I have been tasked with the challenge of exporting data contained in an existing medical practise managment database application (Lets call this application "A") into a form which can be imported into a new practice management application ("B"). There is no facility for exporting data out of "A", but by importing a backup file of "A's" database into a newly created MS SQL database, I have gained access to the raw data and I have worked out the mechanics of pulling the raw data and parsing it for import into"B".
BUT my problem is that "A" stored scans of images and documents (growth charts, lab studies, letters and coorespondence, etc) as BLOBS. There are several thousands of these BLOBS. I cannot import the blob data into "B" as it is designed to store them in flat file form (.tiff or .pdf preferred).
Does anyone know of a tool or application for accomplishing the conversion of blob data fields to image files? I have heard that Visual Fox Pro may be capable of this, but I don't know VFP so that doesn't help a heck of a lot. (Any volunteers? :-) )
Note: "A" is constructed with MS SQL 2000. "B" is built with MySQL.
PS. I am not a programmer by anyone's definition, so an off-the-shelf tool would be much preferred, but I'll take all the help I can get.
Thanks in advance.
I have been tasked with the challenge of exporting data contained in an existing medical practise managment database application (Lets call this application "A") into a form which can be imported into a new practice management application ("B"). There is no facility for exporting data out of "A", but by importing a backup file of "A's" database into a newly created MS SQL database, I have gained access to the raw data and I have worked out the mechanics of pulling the raw data and parsing it for import into"B".
BUT my problem is that "A" stored scans of images and documents (growth charts, lab studies, letters and coorespondence, etc) as BLOBS. There are several thousands of these BLOBS. I cannot import the blob data into "B" as it is designed to store them in flat file form (.tiff or .pdf preferred).
Does anyone know of a tool or application for accomplishing the conversion of blob data fields to image files? I have heard that Visual Fox Pro may be capable of this, but I don't know VFP so that doesn't help a heck of a lot. (Any volunteers? :-) )
Note: "A" is constructed with MS SQL 2000. "B" is built with MySQL.
PS. I am not a programmer by anyone's definition, so an off-the-shelf tool would be much preferred, but I'll take all the help I can get.
Thanks in advance.
ASKER
rw,
My problem limited only to the MS SQL side of the equation. Exporting is the issue. Once I can convert the MS SQL BLOB data to file, importing is a non-issue.
Thanks
My problem limited only to the MS SQL side of the equation. Exporting is the issue. Once I can convert the MS SQL BLOB data to file, importing is a non-issue.
Thanks
ok tell me is that field really BLOB?, cause SQL have TEXT and IMAGE datatypes, I think BLOB is ORACLE and MySQL standard....
btw, for an example I exported
from following query
Select logo from pub_info where pub_Id='1389' and I got this in txt file
474946383961C2001D00B30F00 0000008000 0000800080 8000000080 8000800080 80808080C0 C0C0FF0000 00FF00FFFF 000000FFFF 00FF00FFFF FFFFFF21F9 040100000F 002C000000 00C2001D00 4004FFF0C9 49ABBD38EB CDBBFF6028 8E1C609E28 40AE2C969E 6D2CCFB339 D90F2CE1F8 AEE6BC9FEF 26EC01413A A3F2D76BAA 96C7A154EA 7CC29C449A C7A8ED7A2F DC2FED2514 9B29E4D479 FD55A7CBD9 31DC35CFA4 916171BEFD AABC515465 41684C8285 847151537F 898A588D89 8060459474 91757B6C9A 9B9C9D9E9F A0A1A2A3A4 A5A6A7A8A9 5A6A3E6416 9923B0901A 775B7566B2 5D7F8C888A 5150BE7B8F 93847D8DC3 C07983BEBD C1878BCFAF 6F44BBD0AD 71C9CBD653 BFD5CEC7D1 C3DFDB8197 D8959CB9AA B8B7EBEEEF F0BA92F1B6 B5F4A0F6F7 76D3FA9EBC FD748C01DC B4AB5DBF7C 03CF145407 0F61423D49 1C326BA18E 211081250C 7AB1286761 9825F37F2E CE1168AC24 2B6A274556 D121D28FA4 6C11E78564 C5B295308F 21BBF5CAD6 CCE52C7018 813932C4ED 5C517346B7 C1C2683368 349D49A19D 0439D31538 A452A91613 5A0B19A59A AB9E6A835A 0EABD00E5C D11D1D478C 1C59714053 AA4C4955AB 4B9956879A B497F62E1C BA2373DA25 B752239F87 87119390AB 5806C74E11 00003B
from following query
Select logo from pub_info where pub_Id='1389' and I got this in txt file
474946383961C2001D00B30F00
actually I just realized I maybe waisting your time, I have knowledge of messing with image data type but I certainely am not any master...
ASKER
rw,
Your knowledge exceeds mine, so jump in. I am going to have to log into the client's server to verify the data type. My teminology of BLOB may be inacurate. All I know is that the image data must be in some sort of (binary?) form as there is no flat file structure for the images. (Believe me, I have searched and searched). I will log in this evening and try to determine the exact specs of the image table and fields within.
Thanks for you input so far.
Your knowledge exceeds mine, so jump in. I am going to have to log into the client's server to verify the data type. My teminology of BLOB may be inacurate. All I know is that the image data must be in some sort of (binary?) form as there is no flat file structure for the images. (Believe me, I have searched and searched). I will log in this evening and try to determine the exact specs of the image table and fields within.
Thanks for you input so far.
>>My teminology of BLOB may be inacurate.<<
It is correct. A BLOB (Binary Large Object) in MS SQL Server 2000 are all data types that are of data type text, ntext and image.
>>Does anyone know of a tool or application<<
MS SQL Server 2000 comes with a utility callled TextCopy.exe
It is correct. A BLOB (Binary Large Object) in MS SQL Server 2000 are all data types that are of data type text, ntext and image.
>>Does anyone know of a tool or application<<
MS SQL Server 2000 comes with a utility callled TextCopy.exe
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Anthony
>>It is correct. A BLOB (Binary Large Object) in MS SQL Server 2000 are all data types that are of data type text, ntext and image.<<
just a clarification.
There is no BLOB, CLOB or LOB in MSSQL, yes you are right in essense Text, nText and Image are Binary Large Objects, but the keyword BLOB, CLOB and LOB are used in Oracle, and thats what I was pointing.
rw3admin
>>It is correct. A BLOB (Binary Large Object) in MS SQL Server 2000 are all data types that are of data type text, ntext and image.<<
just a clarification.
There is no BLOB, CLOB or LOB in MSSQL, yes you are right in essense Text, nText and Image are Binary Large Objects, but the keyword BLOB, CLOB and LOB are used in Oracle, and thats what I was pointing.
rw3admin
ASKER
imran_fast,
Thanks for your in-depth response in the use of TextCopy.exe and for taking the time to suggest using a stored procedure complete with examples. (Experts-Exchange is a life-saver!)
I will have access to the client's database this evening and will give your solution a try. My email is skipb(at)t3-tech.com if you think of anything else useful, I would appreciate you forwarding your ideas.
I am still unclear on how I will step through the rows of the table.
Thanks again, experts
Thanks for your in-depth response in the use of TextCopy.exe and for taking the time to suggest using a stored procedure complete with examples. (Experts-Exchange is a life-saver!)
I will have access to the client's database this evening and will give your solution a try. My email is skipb(at)t3-tech.com if you think of anything else useful, I would appreciate you forwarding your ideas.
I am still unclear on how I will step through the rows of the table.
Thanks again, experts
rw3admin,
>>There is no BLOB, CLOB or LOB in MSSQL ...<<
BLOB is a generic DBMS term. I was not referring to a specific data type. If you look up BLOB in BOL it points to the section: "ntext, text, and image" and throughout BOL it refers to "BLOB (text, ntext, or image data)".
cbdrako99,
>>My email is skipb(at)t3-tech.com if you think of anything else useful, I would appreciate you forwarding your ideas. <<
Don't do this. This is against EE Guidelines.
>>There is no BLOB, CLOB or LOB in MSSQL ...<<
BLOB is a generic DBMS term. I was not referring to a specific data type. If you look up BLOB in BOL it points to the section: "ntext, text, and image" and throughout BOL it refers to "BLOB (text, ntext, or image data)".
cbdrako99,
>>My email is skipb(at)t3-tech.com if you think of anything else useful, I would appreciate you forwarding your ideas. <<
Don't do this. This is against EE Guidelines.
yes Anthony, but I was just pointing that Oracle have datatypes named as BLOB CLOB and LOB datatypes...
I just wanted to clear it so you dont think I was an oximoron... (whatever that means)... :)
I just wanted to clear it so you dont think I was an oximoron... (whatever that means)... :)
rw3admin