storage.frm
上传用户:vtryaojia
上传日期:2020-04-18
资源大小:1214k
文件大小:10k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form storage 
  4.    Caption         =   "内存"
  5.    ClientHeight    =   6300
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   7470
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   6300
  11.    ScaleWidth      =   7470
  12.    StartUpPosition =   3  '窗口缺省
  13.    Begin VB.Frame Frame1 
  14.       Height          =   5535
  15.       Left            =   120
  16.       TabIndex        =   0
  17.       Top             =   120
  18.       Width           =   6855
  19.       Begin MSAdodcLib.Adodc Adodc1 
  20.          Height          =   375
  21.          Left            =   4920
  22.          Top             =   4680
  23.          Visible         =   0   'False
  24.          Width           =   1440
  25.          _ExtentX        =   2540
  26.          _ExtentY        =   661
  27.          ConnectMode     =   0
  28.          CursorLocation  =   3
  29.          IsolationLevel  =   -1
  30.          ConnectionTimeout=   15
  31.          CommandTimeout  =   30
  32.          CursorType      =   3
  33.          LockType        =   3
  34.          CommandType     =   8
  35.          CursorOptions   =   0
  36.          CacheSize       =   50
  37.          MaxRecords      =   0
  38.          BOFAction       =   0
  39.          EOFAction       =   0
  40.          ConnectStringType=   1
  41.          Appearance      =   1
  42.          BackColor       =   -2147483643
  43.          ForeColor       =   -2147483640
  44.          Orientation     =   0
  45.          Enabled         =   -1
  46.          Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  47.          OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  48.          OLEDBFile       =   ""
  49.          DataSourceName  =   ""
  50.          OtherAttributes =   ""
  51.          UserName        =   ""
  52.          Password        =   ""
  53.          RecordSource    =   ""
  54.          Caption         =   "Adodc1"
  55.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  56.             Name            =   "宋体"
  57.             Size            =   9
  58.             Charset         =   134
  59.             Weight          =   400
  60.             Underline       =   0   'False
  61.             Italic          =   0   'False
  62.             Strikethrough   =   0   'False
  63.          EndProperty
  64.          _Version        =   393216
  65.       End
  66.       Begin VB.CommandButton Command2 
  67.          Caption         =   "返回"
  68.          Height          =   495
  69.          Left            =   2520
  70.          TabIndex        =   23
  71.          Top             =   4680
  72.          Width           =   1215
  73.       End
  74.       Begin VB.CommandButton Command1 
  75.          Caption         =   "添加"
  76.          Height          =   495
  77.          Left            =   360
  78.          TabIndex        =   22
  79.          Top             =   4680
  80.          Width           =   1215
  81.       End
  82.       Begin VB.TextBox Text10 
  83.          Height          =   375
  84.          Left            =   1440
  85.          TabIndex        =   20
  86.          Top             =   3840
  87.          Width           =   2535
  88.       End
  89.       Begin VB.TextBox Text9 
  90.          Height          =   375
  91.          Left            =   1440
  92.          TabIndex        =   19
  93.          Top             =   3120
  94.          Width           =   1815
  95.       End
  96.       Begin VB.TextBox Text8 
  97.          Height          =   390
  98.          Left            =   4440
  99.          TabIndex        =   18
  100.          Top             =   2400
  101.          Width           =   1815
  102.       End
  103.       Begin VB.TextBox Text7 
  104.          Height          =   375
  105.          Left            =   1440
  106.          TabIndex        =   17
  107.          Top             =   2400
  108.          Width           =   1815
  109.       End
  110.       Begin VB.TextBox Text6 
  111.          Height          =   375
  112.          Left            =   4440
  113.          TabIndex        =   16
  114.          Top             =   1800
  115.          Width           =   1815
  116.       End
  117.       Begin VB.TextBox Text5 
  118.          Height          =   375
  119.          Left            =   1440
  120.          TabIndex        =   15
  121.          Top             =   1800
  122.          Width           =   1815
  123.       End
  124.       Begin VB.TextBox Text4 
  125.          Height          =   375
  126.          Left            =   4440
  127.          TabIndex        =   14
  128.          Top             =   1080
  129.          Width           =   1815
  130.       End
  131.       Begin VB.TextBox Text3 
  132.          Height          =   375
  133.          Left            =   1440
  134.          TabIndex        =   13
  135.          Top             =   1080
  136.          Width           =   1815
  137.       End
  138.       Begin VB.TextBox Text2 
  139.          Height          =   375
  140.          Left            =   4440
  141.          TabIndex        =   12
  142.          Top             =   360
  143.          Width           =   1815
  144.       End
  145.       Begin VB.TextBox Text1 
  146.          Height          =   375
  147.          Left            =   1440
  148.          TabIndex        =   11
  149.          Top             =   360
  150.          Width           =   1815
  151.       End
  152.       Begin VB.Label Label11 
  153.          Caption         =   "注意格式:年-月-日"
  154.          Height          =   255
  155.          Left            =   4320
  156.          TabIndex        =   21
  157.          Top             =   3960
  158.          Width           =   1935
  159.       End
  160.       Begin VB.Label Label10 
  161.          Caption         =   "添加日期:"
  162.          Height          =   255
  163.          Left            =   240
  164.          TabIndex        =   10
  165.          Top             =   3960
  166.          Width           =   1095
  167.       End
  168.       Begin VB.Label Label9 
  169.          Caption         =   "电压(V):"
  170.          Height          =   375
  171.          Left            =   360
  172.          TabIndex        =   9
  173.          Top             =   3240
  174.          Width           =   855
  175.       End
  176.       Begin VB.Label Label8 
  177.          Caption         =   "接口类型:"
  178.          Height          =   375
  179.          Left            =   3360
  180.          TabIndex        =   8
  181.          Top             =   2520
  182.          Width           =   975
  183.       End
  184.       Begin VB.Label Label7 
  185.          Caption         =   "工作频率:"
  186.          Height          =   375
  187.          Left            =   240
  188.          TabIndex        =   7
  189.          Top             =   2520
  190.          Width           =   975
  191.       End
  192.       Begin VB.Label Label6 
  193.          Caption         =   "内存容量:"
  194.          Height          =   375
  195.          Left            =   3360
  196.          TabIndex        =   6
  197.          Top             =   1920
  198.          Width           =   975
  199.       End
  200.       Begin VB.Label Label5 
  201.          Caption         =   "内存类型:"
  202.          Height          =   375
  203.          Left            =   240
  204.          TabIndex        =   5
  205.          Top             =   1800
  206.          Width           =   975
  207.       End
  208.       Begin VB.Label Label4 
  209.          Caption         =   "数量:"
  210.          Height          =   375
  211.          Left            =   3720
  212.          TabIndex        =   4
  213.          Top             =   1200
  214.          Width           =   615
  215.       End
  216.       Begin VB.Label Label3 
  217.          Caption         =   "价格:"
  218.          Height          =   375
  219.          Left            =   600
  220.          TabIndex        =   3
  221.          Top             =   1200
  222.          Width           =   615
  223.       End
  224.       Begin VB.Label Label2 
  225.          Caption         =   "品牌:"
  226.          Height          =   255
  227.          Left            =   3720
  228.          TabIndex        =   2
  229.          Top             =   480
  230.          Width           =   735
  231.       End
  232.       Begin VB.Label Label1 
  233.          Caption         =   "产品名称:"
  234.          Height          =   495
  235.          Left            =   360
  236.          TabIndex        =   1
  237.          Top             =   480
  238.          Width           =   1215
  239.       End
  240.    End
  241. End
  242. Attribute VB_Name = "storage"
  243. Attribute VB_GlobalNameSpace = False
  244. Attribute VB_Creatable = False
  245. Attribute VB_PredeclaredId = True
  246. Attribute VB_Exposed = False
  247. Private Sub Command1_Click()
  248. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  249. If Trim(Text1.Text) <> "" And Trim(Text2.Text) <> "" And Trim(Text3.Text) <> "" And Trim(Text4.Text) <> "" And Trim(Text5.Text) <> "" And Trim(Text6.Text) <> "" And Trim(Text7.Text) <> "" And Trim(Text8.Text) <> "" And Trim(Text9.Text) <> "" And Trim(Text10.Text) <> "" Then
  250.              Adodc1.RecordSource = "select * from storage where GoodsName='" & Trim(Text1.Text) & " '"
  251.              Adodc1.Refresh
  252.              If Adodc1.Recordset.EOF Then
  253.                  Adodc1.Recordset.AddNew
  254.                  Adodc1.Recordset.Fields("GoodsName") = Trim(Text1.Text)
  255.                  
  256.                  Adodc1.Recordset.Fields("GoodsBrand") = Trim(Text2.Text)
  257.                  Adodc1.Recordset.Fields("MarketPrice") = Trim(Text3.Text)
  258.                  Adodc1.Recordset.Fields("GoodsUnit") = Trim(Text4.Text)
  259.                  Adodc1.Recordset.Fields("Type") = Trim(Text5.Text)
  260.                  Adodc1.Recordset.Fields("Content") = Trim(Text6.Text)
  261.                  Adodc1.Recordset.Fields("Workfrequency") = Trim(Text7.Text)
  262.                  Adodc1.Recordset.Fields("Interfacetype") = Trim(Text8.Text)
  263.                  Adodc1.Recordset.Fields("Pressure") = Trim(Text9.Text)
  264.                  
  265.                  Adodc1.Recordset.Fields("AddDate") = Trim(Text10.Text)
  266.                  Adodc1.Recordset.Update
  267.                  Adodc1.Refresh
  268.                 MsgBox (" 恭喜您已经添加成功到数据库!")
  269.              End If
  270.               Else
  271.             MsgBox ("请您把信息填完整,信息不能为空!")
  272. End If
  273. End Sub
  274. Private Sub Command2_Click()
  275. xsp.Show
  276. End Sub
  277. Private Sub Form_Load()
  278. Text10.Text = Format(Now, "yyyy-mm-dd")
  279. End Sub