See above for the detials.
You need to specify the type of the field as "StringClog"
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)
Any ideas why this would happen?
Class
Imports Castle.ActiveRecordImports 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
useage:
'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
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 = nLibrary.nContent.Find(Request("intContentID"))
_nContent.name = txtName.Text
_nContent.text = rchContent.Text 'richtextbox
_nContent.Update()
Cheers
Ed Wake
Remote New Media
t:01588 680480
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users
_______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
