Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

Script to insert and update are generated with wrong values

Posted on by Microsoft Employee

I am trying to develop with sdk (vbtools) a screen to mantain vendor
contacts

but when I try to save the vendor contact for the vendor number 00001
instead
insert vendcontact
(addr1,addr2,emailaddr,vendid,vendcontactid,name,type)  values( '',
'', '', '00001', '2', '', '')
is generating a wrong script
insert vendcontact
(addr1,addr2,emailaddr,vendid,vendcontactid,name,type)  values( '',
'', '', '_     00001', '2', '', '')

why is generating '_     00001' instead only '00001'

I perform another test with custContact and I noticed something
different
the following scripts are generated when I update a field
(CustContact)

update custcontact set addr1=addr1  where custid= '00001' and
contactid= '333'  and tstamp <= 0x0000000219be3d0d

update custcontact set name= '22222'  where custid= '00001' and
contactid= '333'

but when I want to know what VendContact is doing these are the
scripts generated on update.

update vendcontact set addr1=addr1  where vendid= '00001' and
vendcontactid= '445555'  and tstamp <= 0x0000000219be3d81

delete vendcontact where vendid= '00001' and vendcontactid= '445555'

insert vendcontact
(addr1,addr2,emailaddr,vendid,vendcontactid,name,type)  values( '',
'', '', '_0001', '12345', '', '')

*This post is locked for comments

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: Script to insert and update are generated with wrong values

    I've tried sending you an email.

    Barry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Script to insert and update are generated with wrong values

    Ok, I am at alfredo dot becerril --- at --- g            

    ma  il

    thanks

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: Script to insert and update are generated with wrong values

    Sorry - I'm not on twitter.

    Barry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Script to insert and update are generated with wrong values

    I could contact you with twitter?, my account is sonotano, so I could reach you, thanks in advance.

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: Script to insert and update are generated with wrong values

    Alfredo

    The dh file and the table look fine.

    I can't see a reason why it shouldn't work.

    << Could I send you my code?

    If you are able to send the VB project and the related SQL to me, I'm willing to look at it, and try running/debugging it.

    Obviously I don't guarantee I'll find the problem !!

    However, because of Spam etc., I'm not willing to post my email address in this forum.

    Barry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Script to insert and update are generated with wrong values

    CREATE PROCEDURE VendContact_all              

    @parm1 varchar( 15 ),              

    @parm2 varchar( 10 )              

    AS              

    SELECT *              

    FROM VendContact              

    WHERE VendID LIKE @parm1              

       AND ContactID LIKE @parm2    

    ORDER BY VendID,              

       ContactID      

    the mask is WWWWWWWWWW

    CREATE TABLE [dbo].[VendContact](

    [Addr1] [char](60) NOT NULL CONSTRAINT [DF_VendContact_Addr1]  DEFAULT (' '),

    [Addr2] [char](60) NOT NULL CONSTRAINT [DF_VendContact_Addr2]  DEFAULT (' '),

    [City] [char](30) NOT NULL CONSTRAINT [DF_VendContact_City]  DEFAULT (' '),

    [ContactID] [char](10) NOT NULL CONSTRAINT [DF_VendContact_ContactID]  DEFAULT (' '),

    [Country] [char](3) NOT NULL CONSTRAINT [DF_VendContact_Country]  DEFAULT (' '),

    [Crtd_DateTime] [smalldatetime] NOT NULL CONSTRAINT [DF_VendContact_Crtd_DateTime]  DEFAULT (rtrim(CONVERT([varchar](30),CONVERT([smalldatetime],getdate(),(0)),(0)))),

    [Crtd_Prog] [char](8) NOT NULL CONSTRAINT [DF_VendContact_Crtd_Prog]  DEFAULT (' '),

    [Crtd_User] [char](10) NOT NULL CONSTRAINT [DF_VendContact_Crtd_User]  DEFAULT (' '),

    [VendID] [char](15) NOT NULL CONSTRAINT [DF_VendContact_CustID]  DEFAULT (' '),

    [EmailAddr] [char](80) NOT NULL CONSTRAINT [DF_VendContact_EmailAddr]  DEFAULT (' '),

    [Fax] [char](30) NOT NULL CONSTRAINT [DF_VendContact_Fax]  DEFAULT (' '),

    [LUpd_DateTime] [smalldatetime] NOT NULL CONSTRAINT [DF_VendContact_LUpd_DateTime]  DEFAULT ('01/01/1900'),

    [LUpd_Prog] [char](8) NOT NULL CONSTRAINT [DF_VendContact_LUpd_Prog]  DEFAULT (' '),

    [LUpd_User] [char](10) NOT NULL CONSTRAINT [DF_VendContact_LUpd_User]  DEFAULT (' '),

    [Name] [char](60) NOT NULL CONSTRAINT [DF_VendContact_Name]  DEFAULT (' '),

    [NoteID] [int] NOT NULL CONSTRAINT [DF_VendContact_NoteID]  DEFAULT ((0)),

    [OrderLimit] [float] NOT NULL CONSTRAINT [DF_VendContact_OrderLimit]  DEFAULT ((0)),

    [Phone] [char](30) NOT NULL CONSTRAINT [DF_VendContact_Phone]  DEFAULT (' '),

    [POReqdAmt] [float] NOT NULL CONSTRAINT [DF_VendContact_POReqdAmt]  DEFAULT ((0)),

    [S4Future01] [char](30) NOT NULL CONSTRAINT [DF_VendContact_S4Future01]  DEFAULT (' '),

    [S4Future02] [char](30) NOT NULL CONSTRAINT [DF_VendContact_S4Future02]  DEFAULT (' '),

    [S4Future03] [float] NOT NULL CONSTRAINT [DF_VendContact_S4Future03]  DEFAULT ((0)),

    [S4Future04] [float] NOT NULL CONSTRAINT [DF_VendContact_S4Future04]  DEFAULT ((0)),

    [S4Future05] [float] NOT NULL CONSTRAINT [DF_VendContact_S4Future05]  DEFAULT ((0)),

    [S4Future06] [float] NOT NULL CONSTRAINT [DF_VendContact_S4Future06]  DEFAULT ((0)),

    [S4Future07] [smalldatetime] NOT NULL CONSTRAINT [DF_VendContact_S4Future07]  DEFAULT ('01/01/1900'),

    [S4Future08] [smalldatetime] NOT NULL CONSTRAINT [DF_VendContact_S4Future08]  DEFAULT ('01/01/1900'),

    [S4Future09] [int] NOT NULL CONSTRAINT [DF_VendContact_S4Future09]  DEFAULT ((0)),

    [S4Future10] [int] NOT NULL CONSTRAINT [DF_VendContact_S4Future10]  DEFAULT ((0)),

    [S4Future11] [char](10) NOT NULL CONSTRAINT [DF_VendContact_S4Future11]  DEFAULT (' '),

    [S4Future12] [char](10) NOT NULL CONSTRAINT [DF_VendContact_S4Future12]  DEFAULT (' '),

    [Salut] [char](30) NOT NULL CONSTRAINT [DF_VendContact_Salut]  DEFAULT (' '),

    [State] [char](3) NOT NULL CONSTRAINT [DF_VendContact_State]  DEFAULT (' '),

    [Type] [char](2) NOT NULL CONSTRAINT [DF_VendContact_Type]  DEFAULT (' '),

    [User1] [char](30) NOT NULL CONSTRAINT [DF_VendContact_User1]  DEFAULT (' '),

    [User10] [smalldatetime] NOT NULL CONSTRAINT [DF_VendContact_User10]  DEFAULT ('01/01/1900'),

    [User2] [char](30) NOT NULL CONSTRAINT [DF_VendContact_User2]  DEFAULT (' '),

    [User3] [char](30) NOT NULL CONSTRAINT [DF_VendContact_User3]  DEFAULT (' '),

    [User4] [char](30) NOT NULL CONSTRAINT [DF_VendContact_User4]  DEFAULT (' '),

    [User5] [float] NOT NULL CONSTRAINT [DF_VendContact_User5]  DEFAULT ((0)),

    [User6] [float] NOT NULL CONSTRAINT [DF_VendContact_User6]  DEFAULT ((0)),

    [User7] [char](10) NOT NULL CONSTRAINT [DF_VendContact_User7]  DEFAULT (' '),

    [User8] [char](10) NOT NULL CONSTRAINT [DF_VendContact_User8]  DEFAULT (' '),

    [User9] [smalldatetime] NOT NULL CONSTRAINT [DF_VendContact_User9]  DEFAULT ('01/01/1900'),

    [WebSite] [char](40) NOT NULL CONSTRAINT [DF_VendContact_WebSite]  DEFAULT (' '),

    [Zip] [char](10) NOT NULL CONSTRAINT [DF_VendContact_Zip]  DEFAULT (' '),

    [tstamp] [timestamp] NOT NULL

    ) ON [PRIMARY]

    '------------------------------------------------------------------------------

    ' <copyright file="custcont.sdo.vb" company="Microsoft">

    '     Copyright (c) Microsoft Corporation.  All rights reserved.

    ' </copyright>

    '------------------------------------------------------------------------------

    Option Strict Off

    Option Explicit On

    Imports Solomon.Kernel

    Module sdoVendContact

       Public Class VendContact

           Inherits SolomonDataObject

           < _

           DataBinding(PropertyIndex:=0, StringSize:=60) _

           > _

           Public Property Addr1() As String

               Get

                   Return Me.GetPropertyValue("Addr1")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Addr1", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=1, StringSize:=60) _

           > _

           Public Property Addr2() As String

               Get

                   Return Me.GetPropertyValue("Addr2")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Addr2", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=2, StringSize:=30) _

           > _

           Public Property City() As String

               Get

                   Return Me.GetPropertyValue("City")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("City", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=3, StringSize:=10) _

           > _

           Public Property ContactID() As String

               Get

                   Return Me.GetPropertyValue("ContactID")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("ContactID", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=4, StringSize:=3) _

           > _

           Public Property Country() As String

               Get

                   Return Me.GetPropertyValue("Country")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Country", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=5) _

           > _

           Public Property Crtd_DateTime() As Integer

               Get

                   Return Me.GetPropertyValue("Crtd_DateTime")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("Crtd_DateTime", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=6, StringSize:=8) _

           > _

           Public Property Crtd_Prog() As String

               Get

                   Return Me.GetPropertyValue("Crtd_Prog")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Crtd_Prog", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=7, StringSize:=10) _

           > _

           Public Property Crtd_User() As String

               Get

                   Return Me.GetPropertyValue("Crtd_User")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Crtd_User", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=8, StringSize:=15) _

           > _

           Public Property VendID() As String

               Get

                   Return Me.GetPropertyValue("VendID")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("VendID", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=9, StringSize:=80) _

           > _

           Public Property EmailAddr() As String

               Get

                   Return Me.GetPropertyValue("EmailAddr")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("EmailAddr", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=10, StringSize:=30) _

           > _

           Public Property Fax() As String

               Get

                   Return Me.GetPropertyValue("Fax")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Fax", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=11) _

           > _

           Public Property LUpd_DateTime() As Integer

               Get

                   Return Me.GetPropertyValue("LUpd_DateTime")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("LUpd_DateTime", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=12, StringSize:=8) _

           > _

           Public Property LUpd_Prog() As String

               Get

                   Return Me.GetPropertyValue("LUpd_Prog")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("LUpd_Prog", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=13, StringSize:=10) _

           > _

           Public Property LUpd_User() As String

               Get

                   Return Me.GetPropertyValue("LUpd_User")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("LUpd_User", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=14, StringSize:=60) _

           > _

           Public Property Name() As String

               Get

                   Return Me.GetPropertyValue("Name")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Name", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=15) _

           > _

           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:=16) _

           > _

           Public Property OrderLimit() As Double

               Get

                   Return Me.GetPropertyValue("OrderLimit")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("OrderLimit", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=17, StringSize:=30) _

           > _

           Public Property Phone() As String

               Get

                   Return Me.GetPropertyValue("Phone")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Phone", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=18) _

           > _

           Public Property POReqdAmt() As Double

               Get

                   Return Me.GetPropertyValue("POReqdAmt")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("POReqdAmt", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=19, StringSize:=30) _

           > _

           Public Property S4Future01() As String

               Get

                   Return Me.GetPropertyValue("S4Future01")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("S4Future01", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=20, StringSize:=30) _

           > _

           Public Property S4Future02() As String

               Get

                   Return Me.GetPropertyValue("S4Future02")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("S4Future02", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=21) _

           > _

           Public Property S4Future03() As Double

               Get

                   Return Me.GetPropertyValue("S4Future03")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("S4Future03", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=22) _

           > _

           Public Property S4Future04() As Double

               Get

                   Return Me.GetPropertyValue("S4Future04")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("S4Future04", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=23) _

           > _

           Public Property S4Future05() As Double

               Get

                   Return Me.GetPropertyValue("S4Future05")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("S4Future05", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=24) _

           > _

           Public Property S4Future06() As Double

               Get

                   Return Me.GetPropertyValue("S4Future06")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("S4Future06", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=25) _

           > _

           Public Property S4Future07() As Integer

               Get

                   Return Me.GetPropertyValue("S4Future07")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("S4Future07", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=26) _

           > _

           Public Property S4Future08() As Integer

               Get

                   Return Me.GetPropertyValue("S4Future08")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("S4Future08", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=27) _

           > _

           Public Property S4Future09() As Integer

               Get

                   Return Me.GetPropertyValue("S4Future09")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("S4Future09", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=28) _

           > _

           Public Property S4Future10() As Integer

               Get

                   Return Me.GetPropertyValue("S4Future10")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("S4Future10", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=29, StringSize:=10) _

           > _

           Public Property S4Future11() As String

               Get

                   Return Me.GetPropertyValue("S4Future11")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("S4Future11", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=30, StringSize:=10) _

           > _

           Public Property S4Future12() As String

               Get

                   Return Me.GetPropertyValue("S4Future12")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("S4Future12", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=31, StringSize:=30) _

           > _

           Public Property Salut() As String

               Get

                   Return Me.GetPropertyValue("Salut")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Salut", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=32, StringSize:=3) _

           > _

           Public Property State() As String

               Get

                   Return Me.GetPropertyValue("State")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("State", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=33, StringSize:=2) _

           > _

           Public Property Type() As String

               Get

                   Return Me.GetPropertyValue("Type")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Type", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=34, StringSize:=30) _

           > _

           Public Property User1() As String

               Get

                   Return Me.GetPropertyValue("User1")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("User1", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=35) _

           > _

           Public Property User10() As Integer

               Get

                   Return Me.GetPropertyValue("User10")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("User10", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=36, StringSize:=30) _

           > _

           Public Property User2() As String

               Get

                   Return Me.GetPropertyValue("User2")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("User2", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=37, StringSize:=30) _

           > _

           Public Property User3() As String

               Get

                   Return Me.GetPropertyValue("User3")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("User3", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=38, StringSize:=30) _

           > _

           Public Property User4() As String

               Get

                   Return Me.GetPropertyValue("User4")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("User4", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=39) _

           > _

           Public Property User5() As Double

               Get

                   Return Me.GetPropertyValue("User5")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("User5", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=40) _

           > _

           Public Property User6() As Double

               Get

                   Return Me.GetPropertyValue("User6")

               End Get

               Set(ByVal setval As Double)

                   Me.SetPropertyValue("User6", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=41, StringSize:=10) _

           > _

           Public Property User7() As String

               Get

                   Return Me.GetPropertyValue("User7")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("User7", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=42, StringSize:=10) _

           > _

           Public Property User8() As String

               Get

                   Return Me.GetPropertyValue("User8")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("User8", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=43) _

           > _

           Public Property User9() As Integer

               Get

                   Return Me.GetPropertyValue("User9")

               End Get

               Set(ByVal setval As Integer)

                   Me.SetPropertyValue("User9", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=44, StringSize:=40) _

           > _

           Public Property WebSite() As String

               Get

                   Return Me.GetPropertyValue("WebSite")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("WebSite", setval)

               End Set

           End Property

           < _

           DataBinding(PropertyIndex:=45, StringSize:=10) _

           > _

           Public Property Zip() As String

               Get

                   Return Me.GetPropertyValue("Zip")

               End Get

               Set(ByVal setval As String)

                   Me.SetPropertyValue("Zip", setval)

               End Set

           End Property

       End Class

       Public bVendContact As VendContact = New VendContact, nVendContact As VendContact = New VendContact

    End Module

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Script to insert and update are generated with wrong values

    Could I send you my code?

    I have a question, I could develop on sdk with no registration of this "developer module"?

    It could be the reason it is not working?

    However I need an online course for this tool.

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: Script to insert and update are generated with wrong values

    Alfredo

    Have you run Code Inspector?

    If not, I think it is worth doing so - it may find something.

    Can you please post the Create Table script and the dh file for the VendContact table?

    And the stored procedure VendContact_All.

    It is possible that someone looking at them may spot something.

    The only other things that I can think of to double-chrck are the Mask Property of the ContactId control, and the Levels property of the Update control.

    The two problems you are getting are odd ones.

    They both may suggest confusion about the control's version of the ContactId value, the buffer's version and the actual value held in the database.

    So I suspect that the problem may lie somewhere in the points I have raised.

    But I can't suggest anything more specific than that.

    Barry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Script to insert and update are generated with wrong values

    The dh seems to be ok, due is the values are loaded correctly

    this is the DBNav in my grid,

    "[VendContact_all]", "bVendor.VendID"; 0; 0; 0; 0, "bVendContact.ContactID"; 0; 0; 0; 1,

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: Script to insert and update are generated with wrong values

    Alfredo

    Rather puzzling.

    When values get mutilated, as your VendId appears to be, the problem is often a discrepancy between the dh file and the table in the database.

    I'm not sure that is causing your problem, but I think it is definitely worth double-checking the dh file.

    If you use SQL to insert a record into VendContact, then load that record into your screen, does it display correctly?

    If it does, then it suggests that the dh file is probably OK.

    If it does not, then that suggests an error in the dh file, or in the FieldName property of the VendId control.

    Is the VendContact table in a grid?

    If so, I also suggest having a very close look at the grid's DBNav property.

    Perhaps you could post that property here?

    Barry

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans