-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Store Image SQL Server
PostPosted: Tue May 16, 2006 8:11 am 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi all,

I´m using NHibernate with SQL Server 2000 and 2005.

Does Somebody have any example of mapping and code to store
image in SQL Server?

thanks!!!!

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 16, 2006 11:54 am 
Newbie

Joined: Tue May 16, 2006 11:52 am
Posts: 1
Example entity class:

public class Vehicle : Entity
{
//
private byte[] picture;
....
}


Mapping:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" namespace="Model" assembly="CarInsurance Web Application">
<class name="Vehicle" table="Vehicle">

<property name="Picture" type="BinaryBlob" length="1000000"/>

......


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.