ADODC控件为ACCESS数据库建立新表的一种方法
2010-03-18 10:52
197 查看
1、添加ADODC到窗体
2、ACESS数据库中至少有一张表存在。
2、ACESS数据库中至少有一张表存在。
Private Sub Form_Load() Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ "C:/Documents and Settings/Administrator/" & _ "My Documents/11.mdb;Persist Security Info=False" Adodc1.CommandType = adCmdUnknown Adodc1.RecordSource = "select top 1 * from tb11" Adodc1.Refresh With Adodc1.Recordset.ActiveConnection .Execute = "CREATE TABLE [NT_channel_product3]([Id] counter CONSTRAINT id PRIMARY KEY," & _ "[ChID] long NOT NULL ,title text(100) NOT NULL ,[ClassID] long NOT NULL ," & _ "[SpecialID] text (200) NULL ,[TitleColor] text (10) NULL ," & _ "[TitleITF] byte NULL ,[TitleBTF] byte NULL ,[PicURL] text (200) NULL ," & _ "[Content] memo NULL ,[NaviContent] text (200) NULL ," & _ "[ContentProperty] text (9) NULL ,[Author] text (100) NULL ," & _ "[EdITor] text (50) NULL ,[Souce] text (100) NULL ,[OrderID] byte NOT NULL ," & _ "[Tags] text (100) NULL ,[Templet] text (200) NULL ," & _ "[SavePath] text (200) NULL ,[FileName] text (100) NULL ," & _ "[isDelPoint] byte NOT NULL ,[Gpoint] long NULL ,[iPoint] long NULL ," & _ "[GroupNumber] memo NULL ,[Metakeywords] text (200) NULL ," & _ "[Metadesc] text (200) NULL ,[Click] long NULL ," & _ "[CreatTime] datetime NULL ,[isHTML] byte NOT NULL ," & _ "[isConstr] byte NOT NULL ,[ConstrTF] byte NOT NULL)" End With End Sub
相关文章推荐
- 后台取得非服务器控件的一种方法(Request.Form.GetKey(i))
- Jsp连接Access数据库(不通过建立ODBC数据源的方法)
- 遍历页面控件并设置值的一种方法...
- 多叉树结合JavaScript树形控件实现无限级树形菜单(一种构建多级有序树形结构JSON(或XML)数据源的方法)
- c#一种简单快速改变窗体风格和肤色的方法源码及其控件
- Android中动态改变控件的大小的一种方法
- 在datagrid的某列上包含dropdownlist控件的一种方法
- 在VS2010里MFC对话框中使用OpenGL绘图,添加的控件不显示的一种解决方法
- C#窗体控件大小随窗体变化而变化的一种改进方法
- C++中建立对象间消息连接的一种系统方法——回调函数
- 一种使用递归从数据库读取数据来动态建立菜单的方法
- Oracle,在项目上建立与三方厂家公用中间表的一种方法
- C++中建立对象间消息连接的一种系统方法
- Android自定义“图片+文字”控件实现方法之 --------个人最推荐的一种
- ASP.NET服务器控件OnClientClick事件中Eval()作为js方法的参数的一种写法
- c#一种简单快速改变窗体风格和肤色的方法源码及其控件001
- 结构光三维重建之单目标定的一种方法——建立“相位-像点-真实三维坐标”之间的关系
- .NET20 一种简单的窗口控件UI状态控制方法
- 多叉树结合JavaScript树形控件实现无限级树形菜单(一种构建多级有序树形结构JSON(或XML)数据源的方法)
- 网页中控件智能校验的一种实现方法(原创)