|
Hi All, Every time I execute an update / save text is cut off at
approx 4000 chars. A standard SQL insert works fine (I’ve a problem
with the update so I thought I’d see if activeRecord could handle it)
Imports Castle.ActiveRecord.Queries <ActiveRecord("t_content")>
_ Public Class nContent Inherits ActiveRecordBase Private _strContentName As String Private _strContentText As String Private _intContentID As Integer
<PrimaryKey(PrimaryKeyType.Native, "intContentID")> _ Public Property id() As Integer
Get
Return Me._intContentID
End Get
Set(ByVal value As Integer)
Me._intContentID =
value
End Set End Property
<[Property](Column:="strContentName")>
_ Public Property name() As String
Get
Return Me._strContentName
End Get
Set(ByVal value As String)
Me._strContentName =
value
End Set End Property ‘in the db this field is nText
<[Property](Column:="strContentText")>
_ Public Property text() As String
Get
Return Me._strContentText
End Get
Set(ByVal value As String)
Me._strContentText =
value
End Set End Property Public Shared Function Find(ByVal id As Integer)
As nContent
Return CType(ActiveRecordBase.FindByPrimaryKey(GetType(nContent), id),
nContent) End Function End Class
‘add
Castle.ActiveRecord.ActiveRecordStarter.Initialize(New
Castle.ActiveRecord.Framework.Config.XmlConfigurationSource(System.Web.HttpContext.Current.Server.MapPath("appconfig.xml")),
GetType(nLibrary.nContent))
Dim _nContent As New nLibrary.nContent
_nContent.name = txtName.Text
_nContent.text = rchContent.Text ‘richtextbox
_nContent.Save() ‘update
Dim _nContent As New nLibrary.nContent
_nContent = nLibrary.nContent.Find(Request("intContentID"))
_nContent.name = txtName.Text
_nContent.text = rchContent.Text ‘richtextbox
_nContent.Update() Cheers Ed Wake w:www.remotenewmedia.co.uk e:[EMAIL PROTECTED] |
_______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
