vb 中数据库的调用

源代码在线查看: 读取数据.frm

软件大小: 16 K
上传用户: ok34090512
关键词: vb 数据库
下载地址: 免注册下载 普通下载 VIP

相关代码

				VERSION 5.00
				Begin VB.Form 读取数据 
				   Caption         =   "读取数据"
				   ClientHeight    =   3090
				   ClientLeft      =   60
				   ClientTop       =   450
				   ClientWidth     =   4680
				   LinkTopic       =   "Form1"
				   ScaleHeight     =   3090
				   ScaleWidth      =   4680
				   StartUpPosition =   3  '窗口缺省
				End
				Attribute VB_Name = "读取数据"
				Attribute VB_GlobalNameSpace = False
				Attribute VB_Creatable = False
				Attribute VB_PredeclaredId = True
				Attribute VB_Exposed = False
				Dim cn As ADODB.Connection
				Dim cmd As ADODB.Command
				Private Sub Form_Load()
				  Set cn = New ADODB.Connection
				  Set cmd = New ADODB.Command
				   cn.ConnectionString = "DSN=student"
				   cn.Open
				   strsql = "SELECT FirstName INTO " & "[Emp Backup] FROM Customers;"
				   
				   cn.Execute (strsql)
				End Sub
				
							

相关资源