Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Answered

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

Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The application specified size of record xbillableHours (105) does not match the database declared size(101).

    Thanks Perumalsamy. That solved the problem.

  • Verified answer
    Ram Peru Profile Picture
    Ram Peru 2,830 on at
    RE: The application specified size of record xbillableHours (105) does not match the database declared size(101).

    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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans