为什么我的数据库在vb6中出现错误。
为什么我的数据库在vb6中的“可视化数据库管理器”出现错误。
我是用代码建的数据库:窗体上有2个list控件、1个CommonDialog控件、list1代表字段名、list2代表字段长度。都有数据且同长度即:list1.listCount=list2.listCount 代码如下: Dim dbname As Database Dim tdname As TableDef Dim fdname dim dpath as string CommonDialog1.DialogTitle = "新建数据库:" CommonDialog1.Filter = "数据库文件(*.mdb)|*.mdb" CommonDialog1.ShowSave dpath = CommonDialog1.FileName Set dbname = Workspaces(0).CreateDatabase(dpath, dbLangGeneral, dbVersion70) Set tdname = dbname.CreateTableDef("ioriwang") For a = 0 To List1.ListCount - 1 If List3.List(a) = Combo1.List(0) Then Set fdname = tdname.CreateField(List1.List(a), dbBoolean) ElseIf List3.List(a) = Combo1.List(4) Then Set fdname = tdname.CreateField(List1.List(a), dbCurrency) ElseIf List3.List(a) = Combo1.List(7) Then Set fdname = tdname.CreateField(List1.List(a), dbDate) Else Set fdname = tdname.CreateField(List1.List(a), dbText, List2.List(a)) End If tdname.Fields.Append fdname Next a dbname.TableDefs.Append tdname dbname.Close 出现的问题是:用vb6自带的可视化数据管理器打开没问题,但在右下脚的记录号的右边出现[不可更新]这是为什么,点击添加后出现错误:3251 DAO.Recordset 这种对象类型不支持该操作。主要是为什么会出现[不可更新],请各位高手指教,谢谢。 可用E-mail:iori_wang_vb@163.com与我联系