⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 marcdata.frm

📁 出版社图书出货管理系统,包括图书的出库,入库,结果输出
💻 FRM
📖 第 1 页 / 共 3 页
字号:
          kanben = RTrim(LTrim(Getfield(data13, "@d")))
          pagenum = RTrim(LTrim(Getfield(data13, "@a")))
          End If
          If first1 = "000" Then
          marcrecordnum = ""
          marcrecordnum = Trim(data13)
          End If
          If first1 = "330" Then
          context = ""
          context = Getfield(data13, "@a")
          End If
          
         If first1 = "690" Then
          classnum = ""
          classnum = Getfield(data13, "@a")
          End If
          
         If first1 = "905" Then
          bjh = ""
          bjh = Getfield(data13, "@f")
          
          End If
         
          If first1 = "801" Then
           provide = ""
           bly801 = ""
          provide = Getfield(data13, "@b")
          bly801 = "true"
          End If
       Next i
        '将数据写入数据库
          '写入MARC
     If Option1.Value = True Then '直接转入
          Data1.Recordset.AddNew
          Data1.Recordset("bookname") = LTrim$(RTrim$(Left$(bookname, 99)))
          Data1.Recordset("author") = LTrim$(RTrim$(Left$(author, 25)))
          Data1.Recordset("isbn") = LTrim$(RTrim$(Left$(isbn, 15)))
          Data1.Recordset("bms") = LTrim$(RTrim$(Left$(cbs, 25)))
          Data1.Recordset("bmn") = LTrim$(RTrim$(Left$(cbn, 10)))
          Data1.Recordset("context") = context
          Data1.Recordset("marc") = marc
           Data1.Recordset("kanben") = LTrim$(RTrim$(Left$(kanben, 20)))
           Data1.Recordset("pagenum") = LTrim$(RTrim$(Left$(pagenum, 20)))
          Data1.Recordset("jg") = LTrim$(RTrim$(Left$(price, 15)))
          Data1.Recordset("modidate") = Now()
           Data1.Recordset("marcrecordnum") = Trim(Left(marcrecordnum, 20))
           Data1.Recordset("class") = Trim(Left(classnum, 20))
           Data1.Recordset("bjh") = Trim(Left(bjh, 20))
           Data1.Recordset("provide") = Trim(Left(provide, 25))
          Data1.Recordset.Update
          loadrecord = loadrecord + 1
     End If
     If Option2.Value = True Then  'ISBN查重转入
       Data1.Recordset.FindFirst ("isbn='" & isbn & "'")
 
       If Data1.Recordset.NoMatch Then
          Data1.Recordset.AddNew
          Data1.Recordset("bookname") = LTrim$(RTrim$(Left$(bookname, 99)))
          Data1.Recordset("author") = LTrim$(RTrim$(Left$(author, 25)))
          Data1.Recordset("isbn") = LTrim$(RTrim$(Left$(isbn, 10)))
          Data1.Recordset("bms") = LTrim$(RTrim$(Left$(cbs, 25)))
          Data1.Recordset("bmn") = LTrim$(RTrim$(Left$(cbn, 10)))
          Data1.Recordset("context") = context
          Data1.Recordset("marc") = marc
           Data1.Recordset("kanben") = LTrim$(RTrim$(Left$(kanben, 20)))
           Data1.Recordset("pagenum") = LTrim$(RTrim$(Left$(pagenum, 20)))
          Data1.Recordset("jg") = LTrim$(RTrim$(Left$(price, 15)))
          Data1.Recordset("modidate") = Now()
          Data1.Recordset("marcrecordnum") = Trim(Left(marcrecordnum, 20))
           Data1.Recordset("class") = Trim(Left(classnum, 20))
           Data1.Recordset("bjh") = Trim(Left(bjh, 20))
           Data1.Recordset("provide") = Trim(Left(provide, 25))
          Data1.Recordset.Update
          loadrecord = loadrecord + 1
       Else
        isbnstring = isbnstring & "," & isbn
        recordno = recordno + 1
       
       End If
       
     End If
     If Option3.Value = True Then  'ISBN 和书名查重转入
       Data1.Recordset.FindFirst ("isbn='" & isbn & "' and bookname='" & bookname & "'")
       If Data1.Recordset.NoMatch Then
          Data1.Recordset.AddNew
          Data1.Recordset("bookname") = LTrim$(RTrim$(Left$(bookname, 99)))
          Data1.Recordset("author") = LTrim$(RTrim$(Left$(author, 25)))
          Data1.Recordset("isbn") = LTrim$(RTrim$(Left$(isbn, 10)))
          Data1.Recordset("bms") = LTrim$(RTrim$(Left$(cbs, 25)))
          Data1.Recordset("bmn") = LTrim$(RTrim$(Left$(cbn, 10)))
          Data1.Recordset("context") = context
          Data1.Recordset("marc") = marc
           Data1.Recordset("kanben") = LTrim$(RTrim$(Left$(kanben, 20)))
           Data1.Recordset("pagenum") = LTrim$(RTrim$(Left$(pagenum, 20)))
          Data1.Recordset("jg") = LTrim$(RTrim$(Left$(price, 15)))
          Data1.Recordset("modidate") = Now()
          Data1.Recordset("marcrecordnum") = Trim(Left(marcrecordnum, 20))
           Data1.Recordset("class") = Trim(Left(classnum, 20))
           Data1.Recordset("bjh") = Trim(Left(bjh, 20))
           Data1.Recordset("provide") = Trim(Left(provide, 25))
          Data1.Recordset.Update
          loadrecord = loadrecord + 1
       Else
        'isbnstring = isbnstring & "," & isbn
        recordno = recordno + 1
       
       End If
     
     End If
     
     If Option5.Value = True And bly801 = "true" And Len(Trim(isbn)) > 5 Then 'ISBN 和书名查重转入
       Data1.Recordset.FindFirst ("isbn='" & isbn & "' and bookname='" & bookname & "'")
       If Data1.Recordset.NoMatch Then
          Data1.Recordset.AddNew
          Data1.Recordset("bookname") = LTrim$(RTrim$(Left$(bookname, 99)))
          Data1.Recordset("author") = LTrim$(RTrim$(Left$(author, 25)))
          Data1.Recordset("isbn") = LTrim$(RTrim$(Left$(isbn, 10)))
          Data1.Recordset("bms") = LTrim$(RTrim$(Left$(cbs, 25)))
          Data1.Recordset("bmn") = LTrim$(RTrim$(Left$(cbn, 10)))
          Data1.Recordset("context") = context
          Data1.Recordset("marc") = marc
           Data1.Recordset("kanben") = LTrim$(RTrim$(Left$(kanben, 20)))
           Data1.Recordset("pagenum") = LTrim$(RTrim$(Left$(pagenum, 20)))
          Data1.Recordset("jg") = LTrim$(RTrim$(Left$(price, 15)))
          Data1.Recordset("modidate") = Now()
          Data1.Recordset("marcrecordnum") = Trim(Left(marcrecordnum, 20))
           Data1.Recordset("class") = Trim(Left(classnum, 20))
           Data1.Recordset("bjh") = Trim(Left(bjh, 20))
           Data1.Recordset("provide") = Trim(Left(provide, 25))
          Data1.Recordset.Update
          loadrecord = loadrecord + 1
       Else
        'isbnstring = isbnstring & "," & isbn
         recordno = recordno + 1
         If IsNull(Data1.Recordset("marc").Value) Then
           tempmarclen = 0
         Else
           tempmarclen = Len(Data1.Recordset("marc").Value)
         End If
         thismarclen = Len(marc)
         If thismarclen > tempmarclen Then
           Data1.Recordset.Edit
           Data1.Recordset("marc") = marc
           Data1.Recordset.Update
         End If
       
       End If
       Else
       '没有801字段和ISBN的数据
       recno801 = recno801 + 1
      
       Print #2, marc
       
       
     End If
     
     If Option4.Value = True Then  'ISBN、书名和价格查重转入
       Data1.Recordset.FindFirst ("isbn='" & isbn & "' and bookname='" & bookname & "' and jg='" & price & "'")
       If Data1.Recordset.NoMatch Then
          Data1.Recordset.AddNew
          Data1.Recordset("bookname") = LTrim$(RTrim$(Left$(bookname, 99)))
          Data1.Recordset("author") = LTrim$(RTrim$(Left$(author, 25)))
          Data1.Recordset("isbn") = LTrim$(RTrim$(Left$(isbn, 10)))
          Data1.Recordset("bms") = LTrim$(RTrim$(Left$(cbs, 25)))
          Data1.Recordset("bmn") = LTrim$(RTrim$(Left$(cbn, 10)))
          Data1.Recordset("context") = context
          Data1.Recordset("marc") = marc
           Data1.Recordset("kanben") = LTrim$(RTrim$(Left$(kanben, 20)))
           Data1.Recordset("pagenum") = LTrim$(RTrim$(Left$(pagenum, 20)))
          Data1.Recordset("jg") = LTrim$(RTrim$(Left$(price, 15)))
          Data1.Recordset("modidate") = Now()
          Data1.Recordset("marcrecordnum") = Trim(Left(marcrecordnum, 20))
           Data1.Recordset("class") = Trim(Left(classnum, 20))
           Data1.Recordset("bjh") = Trim(Left(bjh, 20))
           Data1.Recordset("provide") = Trim(Left(provide, 25))
          Data1.Recordset.Update
          loadrecord = loadrecord + 1
       Else
        isbnstring = isbnstring & "," & isbn
        recordno = recordno + 1
       
       End If
     
     End If
     bly801 = ""
      isbn = "" 'chr(31) a
       price = "" 'chr(31)d
      bookname = ""
      author = ""
      isbn = ""
      cbs = ""
      cbn = ""
      context = ""
      price = ""
      marc = ""
      marcrecordnum = ""
       provide = ""
        bjh = ""
       classnum = ""
        kanben = ""
          pagenum = ""
      linestring = ""
      currecord = currecord + 1
      Me.Caption = "正在处理第:" & currecord & "条记录"
      If currecord > maxrecord Then
        MsgBox banben & "版只能转入记录" & currecord & "条。请使用高级版!"
         Close (1)
        GoTo xy2
      End If
     Loop
xy2:

     MsgBox "MARC数据转入完成!共转入:" & loadrecord & "条数据"
     If Option1.Value = True Then
       Text3.Text = "  数据处理完成,共处理" & currecord & "条记录,转入" & loadrecord & "条记录到预采库中。"
       Text3.Text = Text3.Text & vbCrLf & "错误ISBN数为:" & errisbnnum & vbCrLf & "错误ISBN数据为:" & errisbn
     End If
     If Option2.Value = True Then
       Text3.Text = "  数据处理完成,共处理" & currecord & "条记录,转入" & loadrecord & "条记录到预采库中。"
       Text3.Text = Text3.Text & vbCrLf & "错误ISBN数为:" & errisbnnum & vbCrLf & "错误ISBN数据为:" & errisbn
       Text3.Text = Text3.Text & vbCrLf & "有" & recordno & "条记录ISBN号重复,为:" & isbnstring
       
     End If
     If Option3.Value = True Then
       Text3.Text = "  数据处理完成,共处理" & currecord & "条记录,转入" & loadrecord & "条记录到预采库中。"
       Text3.Text = Text3.Text & vbCrLf & "错误ISBN数为:" & errisbnnum & vbCrLf & "错误ISBN数据为:" & errisbn
       Text3.Text = Text3.Text & "有" & recordno & "条记录ISBN号和书名重复,为:" & isbnstring
       
     End If
     If Option4.Value = True Then
       Text3.Text = "  数据处理完成,共处理" & currecord & "条记录,转入" & loadrecord & "条记录到预采库中。"
       Text3.Text = Text3.Text & vbCrLf & "错误ISBN数为:" & errisbnnum & vbCrLf & "错误ISBN数据为:" & errisbn
       Text3.Text = Text3.Text & vbCrLf & "有" & recordno & "条记录ISBN号、书名和价格重复,为:" & isbnstring
       
     End If
     If Option5.Value = True Then
       Text3.Text = "  数据处理完成,共处理" & currecord & "条记录,转入" & loadrecord & "条记录到预采库中。"
       Text3.Text = Text3.Text & vbCrLf & "错误ISBN数为:" & errisbnnum & vbCrLf & "错误ISBN数据为:" & errisbn
       Text3.Text = Text3.Text & "有" & recordno & "条记录ISBN号和书名重复,无801字段和ISBN号有误记录:" & recno801
       
       Text3.Text = Text3.Text & "见文件:d:\tscg\temp\errormarc.txt"
       
       
     End If
  End If
'---------------------------------------------------------
  Close (1)
  Close (2)
  
End Sub

Private Sub Form_Load()
 If worktok = "馆藏" Then
     Frame2.Visible = False
     Frame1.Visible = True
     
     Data1.RecordSource = "本馆数据"
     Me.Caption = "MARC转入本馆数据"
     Text3.Text = "转入的字段有:书名,作者,ISBN,出版社,出版年,价格,复本数"
  End If
  If worktok = "预采库" Then
     Frame1.Visible = False
     Frame2.Visible = True
     
   Data1.RecordSource = "预采数据"
    Me.Caption = "MARC转入预采数据"
    Text3.Text = "转入的字段有:书名,作者,ISBN,出版社,出版年,价格,内容题要,MARC记录"
  End If
      
  If banben = "试用" Then
  Command3.Enabled = True
  
  End If
  
   If banben = "正式" Then
   Command3.Enabled = True
  
  End If
   If banben = "PDA" Then
  Command3.Enabled = True
  
  End If
   If banben = "高级" Then
 Command3.Enabled = True
  
  End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -