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

📄 form1.frm

📁 这是一个可以实现从数据库外部直接转入任何表的任何数据的控件的源代码
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5340
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7620
   LinkTopic       =   "Form1"
   ScaleHeight     =   5340
   ScaleWidth      =   7620
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   180
      Top             =   4890
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin Im_Port.ImPort I 
      Height          =   5415
      Left            =   30
      TabIndex        =   0
      Top             =   0
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   9551
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a As New Connection
Dim b As New Recordset

Private Sub Form_Load()
    'a.Open "Provider=MSDASQL.1;password=;User ID=sa;Data Source=zglm_yule"
    a.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=zglmyule;Data Source=ldeyong"
    'b.Open "SELECT  * FROM VIEW_xsxxk_c LEFT OUTER JOIN (SELECT xh, zczt 是否注册$, zcyy 注册原因$, spr 审批人$, czr 注册人$, czsj 注册时间$, xn 学年$, xq 学期$ From zc_status_xs WHERE xn = '2003' AND xq = '1') tem ON tem.xh = VIEW_xsxxk_c.学号", a, adOpenDynamic, adLockBatchOptimistic
    b.Open "select * FROM news", a, adOpenDynamic, adLockReadOnly
    'b.Open "select * from view_xsxxk_c", a, adOpenDynamic, adLockReadOnly
    I.GetImRecordSet = b
    I.Im_DBType = ToSqlserver
    I.ImAera ToBothDatabase
End Sub

Private Sub ImPort1_EndClick()
    Unload Me
End Sub

⌨️ 快捷键说明

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