Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I am very impressed with the site and have already recommended it to one of my associates. I was truly impressed with the quickness in which someone actually responded to my question..."

Geography

Where in the world do Tek-Tips members come from?
davidM1 (Programmer)
26 Apr 06 11:16
Problem Detail:

using com object VMFGSLS.DLL and receiving error:

Non-nullable column cannot be updated to Null.

 

Only occurs with the Shipper_lines.  The documentation refers to

SHIPPER_LINES but the CODE must have SHIPMENT_LINES.

Problem can be recreated with:

 

Private Sub shipButton_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles shipButton.Click

        Dim CustOrder As VMFGSLS.CustomerOrder

        Dim rs As ADODB.Recordset

        Dim rs2 As ADODB.Recordset

        Dim rsTrace As ADODB.Recordset

        Dim rsline As ADODB.Recordset

        Dim rsorder As ADODB.Recordset

        Dim ctr As Integer

        Dim shipped As String

 

 

        'On Error GoTo ship_handler

        CustOrder = CreateObject("vmfgsls.customerOrder")

 

        If CustOrder.Exists("VPART", custorderid.Text.ToUpper) Then

 

        Else

            MsgBox(custorderid.Text & " does not exists")

            Exit Sub

        End If

 

        rsorder = CustOrder.Load("VPART", custorderid.Text.ToUpper, "")

        If rsorder.Fields("STATUS").Value <> "R" Then

            MsgBox("order " & custorderid.Text.ToUpper & " not in released

status")

            Exit Sub

        End If

 

 

        rsline = rsorder.Fields("CUST_ORDER_LINE").Value

        shipped = custorderid.Text.ToUpper & vbCrLf

 

 

        rs = CustOrder.Prepare("VPART", "SHIPMENT")

        rs.AddNew()

        rs.Fields("ENTRY_NO").Value = 1

        rs.Fields("CUST_ORDER_ID").Value = custorderid.Text.ToUpper

        rs.Fields("TRANSACTION_DATE").Value = Now()

 

        rs.Fields("CLOSE_SHORT").Value = False

        rs.Fields("USER_ID").Value = "SYSADM"

        rs.Update()

 

        rs2 = rs("SHIPMENT_LINE").Value

 

        While Not rsline.EOF

            rs2.AddNew()

            ctr += 1

            rs2.Fields("ENTRY_NO").Value = ctr

            rs2.Fields("LINE_NO").Value = rsline.Fields("LINE_NO").Value

            rs2.Fields("USER_QTY").Value =

rsline.Fields("ORDER_QTY").Value

            shipped = shipped & " " & rsline.Fields("LINE_NO").Value & " "

& rsline.Fields("ORDER_QTY").Value

            'Debug.Print(ctr & " " & rsline.Fields("LINE_NO").Value & " "

& rsline.Fields("ORDER_QTY").Value)

            rsline.MoveNext()

 

        End While

 

 

        rs2.Update()

 

        'rsTrace = rs2("TRACE_INFO").Value

        'rsTrace.AddNew()

        'rsTrace("ENTRY_NO").Value = 1

        'rsTrace("LINE_NO").Value = 1

        'rsTrace("TRACE_ID").Value = custorderid.Text.ToUpper

        'rsTrace("QTY").Value = 1

 

        rs2 = Nothing

 

        rs = CustOrder.Save("VPART", rs)

        MsgBox(shipped & " shipped packlist=" &

rs.Fields("PACKLIST_ID").Value)

 

        rs = Nothing

 

out:

 

 

        Exit Sub

ship_handler:

        MsgBox("error:" & Err.Description)

        Resume out

 

    End Sub

 



 

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close