首页上一页 1 下一页尾页 1 条记录 1/1页
请问我这个用vb怎么始终实不了。
发表在VB答疑区
2011-03-05
是否精华
是
否
版块置顶:
是
否
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strconn As String
Dim i As Integer
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
strconn = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\zhu;Exclusive=No"
conn.Open strconn
conn.CommandTimeout = 3000
rs.Open "select * into gg from cs", conn, adOpenDynamic, adLockOptimistic ①
以上是我的代码,在c:\zhu存放一个cs的dbf文件,连接查询等操作都可以,但是想通过查询语句实现生成一个新表gg,同样还放c:\zhu下,为什么运行总不成功,总提示,实时错误'-2147217887(80040e21)'odbc驱动程序不支持所需属性?
①换成这样的语句 rs.open "select * into [FoxPro2.6;database=c:\zhu].gg from cs",conn, adOpenDynamic, adLockOptimistic
或
rs.open "select * into [FoxPro2.5;database=c:\zhu].gg from cs",conn, adOpenDynamic, adLockOptimistic
或
rs.open "select * into [dBaseIII;database=c:\zhu].gg from cs",conn, adOpenDynamic, adLockOptimistic
均提示
实时错误'-2147217887(80040e21)'odbc驱动程序不支持所需属性?
请问怎么解决这个问题啊?谢谢!
Dim rs As ADODB.Recordset
Dim strconn As String
Dim i As Integer
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
strconn = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\zhu;Exclusive=No"
conn.Open strconn
conn.CommandTimeout = 3000
rs.Open "select * into gg from cs", conn, adOpenDynamic, adLockOptimistic ①
以上是我的代码,在c:\zhu存放一个cs的dbf文件,连接查询等操作都可以,但是想通过查询语句实现生成一个新表gg,同样还放c:\zhu下,为什么运行总不成功,总提示,实时错误'-2147217887(80040e21)'odbc驱动程序不支持所需属性?
①换成这样的语句 rs.open "select * into [FoxPro2.6;database=c:\zhu].gg from cs",conn, adOpenDynamic, adLockOptimistic
或
rs.open "select * into [FoxPro2.5;database=c:\zhu].gg from cs",conn, adOpenDynamic, adLockOptimistic
或
rs.open "select * into [dBaseIII;database=c:\zhu].gg from cs",conn, adOpenDynamic, adLockOptimistic
均提示
实时错误'-2147217887(80040e21)'odbc驱动程序不支持所需属性?
请问怎么解决这个问题啊?谢谢!