web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

The application specified size of record xbillableHours (105) does not match the database declared size(101).

(0) ShareShare
ReportReport
Posted on by

Hello Community,

I get the above error in the setaddress call.

Here my table structure.

CREATE TABLE [dbo].[XBillableHours](
	[custID] [char](15) NOT NULL,
	[Descr] [char](60) NOT NULL,
	[Hours] [float] NOT NULL,
	[LineNbr] [smallint] NOT NULL,
	[NoteId] [smallint] NULL,
	[SlsperID] [char](10) NOT NULL,
	[WorkDate] [smalldatetime] NOT NULL,
	[tstamp] [timestamp] NOT NULL,
 CONSTRAINT [XBillableHours0] PRIMARY KEY CLUSTERED 
(
	[custID] ASC,
	[LineNbr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


Here my DH file

Public Class XBillableHours
        Inherits SolomonDataObject
        < _
        DataBinding(PropertyIndex:=0, StringSize:=15) _
        > _
        Public Property custID() As String
            Get
                Return Me.GetPropertyValue("custID")
            End Get
            Set(ByVal setval As String)
                Me.SetPropertyValue("custID", setval)
            End Set
        End Property

        < _
        DataBinding(PropertyIndex:=1, StringSize:=60) _
        > _
        Public Property Descr() As String
            Get
                Return Me.GetPropertyValue("Descr")
            End Get
            Set(ByVal setval As String)
                Me.SetPropertyValue("Descr", setval)
            End Set
        End Property

        < _
        DataBinding(PropertyIndex:=2) _
        > _
        Public Property Hours() As Double
            Get
                Return Me.GetPropertyValue("Hours")
            End Get
            Set(ByVal setval As Double)
                Me.SetPropertyValue("Hours", setval)
            End Set
        End Property

        < _
        DataBinding(PropertyIndex:=3) _
        > _
        Public Property LineNbr() As Integer
            Get
                Return Me.GetPropertyValue("LineNbr")
            End Get
            Set(ByVal setval As Integer)
                Me.SetPropertyValue("LineNbr", setval)
            End Set
        End Property

        < _
        DataBinding(PropertyIndex:=4) _
        > _
        Public Property NoteId() As Integer
            Get
                Return Me.GetPropertyValue("NoteId")
            End Get
            Set(ByVal setval As Integer)
                Me.SetPropertyValue("NoteId", setval)
            End Set
        End Property

        < _
        DataBinding(PropertyIndex:=5, StringSize:=10) _
        > _
        Public Property SlsperID() As String
            Get
                Return Me.GetPropertyValue("SlsperID")
            End Get
            Set(ByVal setval As String)
                Me.SetPropertyValue("SlsperID", setval)
            End Set
        End Property

        < _
        DataBinding(PropertyIndex:=6) _
        > _
        Public Property WorkDate() As Integer
            Get
                Return Me.GetPropertyValue("WorkDate")
            End Get
            Set(ByVal setval As Integer)
                Me.SetPropertyValue("WorkDate", setval)
            End Set
        End Property

    End Class
    Public bXBillableHours As XBillableHours = New XBillableHours, nXBillableHours As XBillableHours = New XBillableHours

    Public CSR_XBillableHours As Short
    Public Sub Init_XBillableHours(ByRef x_Level As Short, ByRef x_Cursor As Boolean)
        Call SetAddr(x_Level, "bXBillableHours", bXBillableHours, nXBillableHours)
        If x_Cursor = True Then
            Call SqlCursorEx(CSR_XBillableHours, x_Level, "CSR_XBillableHours", "XBillableHours", "XBillableHours")
        End If
    End Sub

 Any pointers as to why i get the error?

Ronald

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ram Peru Profile Picture
    2,830 on at

    Hello Ronald,

    Please follow the below steps to resolve the issue.

    1. Drop table XBillableHours

    2. Execute the create table script again

    3. modify the below part in your DH 

       < _
            DataBinding(PropertyIndex:=3) _
            > _
            Public Property LineNbr() As Short
                Get
                    Return Me.GetPropertyValue("LineNbr")
                End Get
                Set(ByVal setval As Short)
                    Me.SetPropertyValue("LineNbr", setval)
                End Set
            End Property

            < _
            DataBinding(PropertyIndex:=4) _
            > _
            Public Property NoteId() As Short
                Get
                    Return Me.GetPropertyValue("NoteId")
                End Get
                Set(ByVal setval As Short)
                    Me.SetPropertyValue("NoteId", setval)
                End Set
            End Property

    4. Open the Dynamics SL and check the screen for this issue

    Hope this will fix your issue. please keep me posted if you see any issues.

  • Community Member Profile Picture
    on at

    Thanks Perumalsamy. That solved the problem.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans