如何动态在数据库中增加字段,新建查询?

hongsongboy 2002-06-29 06:37:17
初学者,还望高手指点!!
...全文
70 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
hongsongboy 2002-07-16
  • 打赏
  • 举报
回复
还有没有别的方法?
hongsongboy 2002-07-02
  • 打赏
  • 举报
回复
我试一下。
hongsongboy 2002-07-01
  • 打赏
  • 举报
回复
问题是现在手头没有合适的资料,还请各位帮帮忙.
griefforyou 2002-07-01
  • 打赏
  • 举报
回复
看看T-SQL帮助吧!
hongsongboy 2002-07-01
  • 打赏
  • 举报
回复
数据库是access
hongsongboy 2002-07-01
  • 打赏
  • 举报
回复
有高手回答吗?
rdo-mark 2002-07-01
  • 打赏
  • 举报
回复

有帮助吗?

test --------- 表名
tt -----------字段名
我是用 ADODB.Connection


Option Explicit
Dim Cnnall As ADODB.Connection
Private Sub Command1_Click()
Dim Cn As New ADODB.Command
Set Cn = New ADODB.Command
Set Cn.ActiveConnection = Cnnall
Cn.CommandType = adCmdText
Cn.CommandText = "ALTER table test ADD column tt text(30) null"
Cn.Execute
End Sub

Private Sub Form_Load()

Set Cnnall = New ADODB.Connection
Cnnall.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\WINDOWS\Desktop\s\db2.mdb;Persist Security Info=False"
End Sub

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧