VB代码 如何在SQL中插入数据或更新数据
如何在SQL数据库表tooluse中的turtime中插入text2.text当tubh=text1.text的时候SQLtooluse表createtabletoolu...
如何在SQL数据库表tooluse中的turtime中插入text2.text 当tubh=text1.text的时候
SQL tooluse 表
create table tooluse
(
tubh int identity(1,1) primary key,
tuname varchar(20),
tutool varchar(20),
tubtime varchar(20),
tuptime varchar(20),
turtime varchar(20)
)
go
insert into tooluse values(
'蒋群立',
'TQ327238013032/2Y',
'2009-01-01',
'2009-01-02',
'2009-02-02'
)
VB中的代码为
Private Sub Command1_Click()
Dim conn As New ADODB.Connection
conn.CursorLocation = adUseClient
conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Initial Catalog=management;Data Source=MICROSOF-2B31DF"
conn.Open
conn.Execute""这里面不知道如何写代码 插入text2.text 到表 tooluse里的turtime中去,当 tooluse中的tubh =text1.text
小弟分数有限。请各位前辈帮忙。 展开
SQL tooluse 表
create table tooluse
(
tubh int identity(1,1) primary key,
tuname varchar(20),
tutool varchar(20),
tubtime varchar(20),
tuptime varchar(20),
turtime varchar(20)
)
go
insert into tooluse values(
'蒋群立',
'TQ327238013032/2Y',
'2009-01-01',
'2009-01-02',
'2009-02-02'
)
VB中的代码为
Private Sub Command1_Click()
Dim conn As New ADODB.Connection
conn.CursorLocation = adUseClient
conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Initial Catalog=management;Data Source=MICROSOF-2B31DF"
conn.Open
conn.Execute""这里面不知道如何写代码 插入text2.text 到表 tooluse里的turtime中去,当 tooluse中的tubh =text1.text
小弟分数有限。请各位前辈帮忙。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询