Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error On while executing to insert image on it??? Expand / Collapse
Author
Message
Posted Monday, January 28, 2013 3:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:33 PM
Points: 172, Visits: 427
create table Wishing
(
ID int identity,
ImageName varchar(500),
ImagePath varbinary(2000)
)

insert into Wishing(Imagename,imagepath)
values('sunrising','images/sun.jpeg')

while i am inserting image to to table showing error on use convert and run ur query???
Post #1412307
Posted Monday, January 28, 2013 5:25 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 11:20 AM
Points: 1,945, Visits: 3,204
The ImagePath column is Varbinary data type, and you're trying to insert the value 'images/sun.jpeg', which is not Varbinary type.

Do you want to insert the actual image or just it's path? The column name & value would indicate the path, the data type the image.

Thanks
Gaz
Post #1412362
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse