Forums

This topic is locked

recordset test failed when picture fiels is a blob

Posted 05 Jan 2006 04:30:14
1
has voted
05 Jan 2006 04:30:14 amir kho posted:
Hi guys i am new user dont know much about the rules,
But here is my problem i am trying to build a site using mysql php and Dreamweaver i have a field in database called pictures and data type is BLOB when i try to create a recordset in dreamweaver it gives me an error message (AN UNIDENTIFIED ERROR HAS OCCURRED ) But when select all but the picture field it works fine anyone has any idea wahts going on. I rather store pictures to a folder then to a database but i dont know how to do that within Dreamweaver please help.
Thanks in Advance<b></b>

Edited by - amir2647 on 05 Jan 2006 04:32:08

Replies

Replied 17 Jan 2006 04:51:29
17 Jan 2006 04:51:29 Dave Thomas replied:
change data type to a normal varChar give it a decent length to hold a filename like 75/100 or something.

now instead of having them as blogs stored as binary, just save the path to the image that the page will use.

for example

table field: picPath
field1 : '../myPics/picture1.jpg'
field2 : '../myPics/picture50.jpg'

now when you create your recordset and repeat region or whatever, it's a simple change of how you insert the image. instead of choosing from the file system which will bring up the default 'Browse' box, choose the Data Sources option and then you can choose your table field from the recordset list as shown in the pic.

<img src="www.bluecoder.co.uk/dmx/dynamic_image_insert.jpg" border=0>

your pics may show up as funny icons, but test online and you should see the images appear.
if i left anything out, post back and i'll get back to ya.

regards

Dave Thomas
<b>DMX Zone Forums Manager</b>

Reply to this topic