By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

column-OicAdmin-does-not-belong to table

P: 1
when im trying to save my data I get an error
column-OicAdmin-does-not-belong to table


Expand|Select|Wrap|Line Numbers
  1. Case "btnSave"
  2.                 If RequiredField(dtDate) = False Then Exit Sub
  3.                 Mode = Mode.LoadRecord
  4.                 If gMobile.Text = "New Record" Then
  5.                     dt = ExecuteQuery("select isnull(max(nIdentity), 0) as nIdentity from inventory")
  6.                     txtTransNo.Text = Str(Now.Year).Substring(3, 2) & Format(Now.Month, "0#") & "-" & Format(dt.Rows(0).Item(0) + 1, "00000#")
  7.                     If Existing("inventory", "cTranNo", Trim(txtTransNo.Text)) = True Then Exit Sub
  8.                     drHeader = dtHeader.NewRow
  9.                     drHeader.Item("cTranNo") = Trim(txtTransNo.Text)
  10.                     drHeader.Item("cRemarks") = Trim(txtRemarks.Text)
  11.  
  12.                     If dtDate.Text = "" Then drHeader.Item("dDate") = DBNull.Value Else drHeader.Item("dDate") = dtDate.Value
  13.                     drHeader.Item("nTotal") = lblTotal.Text
  14.                     drHeader.Item("nScanned") = lblScanned.Text
  15.                     drHeader.Item("nNotScanned") = lblNotScanned.Text
  16.                     drHeader.Item("nCorrect") = lblCorrect.Text
  17.                     drHeader.Item("nException") = lblException.Text
  18.                     drHeader.Item("cPreparedByCode") = usercode
  19.                     drHeader.Item("cPreparedByName") = username
  20.                     drHeader.Item("cAccOfficerCode") = Trim(txtCustodianCode.Text)
  21.                     drHeader.Item("cAccOfficerName") = Trim(txtCustodianName.Text)
  22.                     drHeader.Item("cAccOfficerPosition") = Trim(txtPosition.Text)
  23.                     drHeader.Item("cEncoder") = Trim(txtEncoder.Text)
  24.                     drHeader.Item("cSupplyOfficer") = Trim(txtSupplyOfficer.Text)
  25.                     drHeader.Item("cTeamLeader") = Trim(txtTeamLeader.Text)
  26.                     drHeader.Item("cObserver") = Trim(txtObserver.Text)
  27.                     drHeader.Item("cMis") = Trim(txtMis.Text)
  28.                     drHeader.Item("cGenAccounting") = Trim(txtGenAccounting.Text)
  29.                     drHeader.Item("cApprovedby") = Trim(txtApprovedby.Text)
  30.                     drHeader.Item("cType") = Trim(txtType.Text)
  31.                     drHeader.Item("cOicAdmin") = Trim(txOicAdmin.Text)<-------------error here
  32.                         dtHeader.Rows.Add(drHeader)
  33.                         Call AuditTrail(Trim(txtTransNo.Text), "Created")
  34.                         Do While dtAll.DefaultView.Count - 1 >= 0
  35.                             dtAll.DefaultView.Item(0).Row("cTranNo") = Trim(txtTransNo.Text)
  36.                         Loop
  37.                         Do While dtCorrect.DefaultView.Count - 1 >= 0
  38.                             dtCorrect.DefaultView.Item(0).Row("cTranNo") = Trim(txtTransNo.Text)
  39.                         Loop
  40.                         Do While dtException.DefaultView.Count - 1 >= 0
  41.                             dtException.DefaultView.Item(0).Row("cTranNo") = Trim(txtTransNo.Text)
  42.                         Loop
  43.                         Do While dtNotScanned.DefaultView.Count - 1 >= 0
  44.                             dtNotScanned.DefaultView.Item(0).Row("cTranNo") = Trim(txtTransNo.Text)
  45.                         Loop
Oct 30 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.