| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1268 人关注过本帖
标题:vb数据库,seek方法,实时错误13,数据类型不符
只看楼主 加入收藏
leokan
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-7-3
收藏
 问题点数:0 回复次数:1 
vb数据库,seek方法,实时错误13,数据类型不符

模块内容:

Option Explicit
Public cnFriend As ADODB.Connection

Public Sub Friendconnection()
Set cnFriend = New Connection

cnFriend.ConnectionTimeout = 15
cnFriend.Open " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\hail-fellow.mdb;Persist Security Info=False"
cnFriend.CursorLocation = adUseClient
End Sub

Public Sub main()
Friendconnection
frmSplash.Show
End Sub

Public Sub EnterTab(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{Tab}"
End If
End Sub

窗体内容:

Option Explicit
Dim fr_Rec As ADODB.Recordset
Dim Acc As String
Dim Fr_Query As ADODB.Recordset
Dim Querye As String
Dim Fr_Query1 As ADODB.Recordset
Dim Querye1 As String
Dim strxm As String


Private Sub Command1_Click()
Dim tempstr As String
Set Fr_Query1 = New ADODB.Recordset

Querye1 = "select * from DataDeposited where name='" & Query.Text1(0).Text & "'"
Fr_Query1.Open Querye1, cnFriend, adOpenKeyset, adLockOptimistic, adCmdText
If Fr_Query.RecordCount <= 0 Then Exit Sub
tempstr = Fr_Query1(9) & ""
Text4.Text = tempstr


Call updataX
End Sub

Private Sub Form_Load()
Set fr_Rec = New ADODB.Recordset

Acc = "Select * From DataDeposited"
fr_Rec.Open Acc, cnFriend, adOpenKeyset, adLockOptimistic, adCmdText
Set Fr_Query = New ADODB.Recordset
Set Fr_Query = New ADODB.Recordset
Querye = "select * from DataDeposited"
Fr_Query.Open Querye, cnFriend, adOpenKeyset, adLockOptimistic, adCmdText

End Sub

Private Sub updataX()
Dim rs As New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockPessimistic
rs.Index = "Name"
Set rs = New ADODB.Recordset
Set rs = cnFriend.Execute("select * from DataDeposited")

rs.Seek "=", Query.Text1(0).Text ‘————————————出错处
rs!message = Text4.Text & Text1.Text & Text2.Text & ""
rs.Update
End Sub

如上面出错,实时错误13 类型不匹配,怎样解决?

搜索更多相关主题的帖子: 数据库 seek Microsoft 实时 Sub 
2007-07-03 20:02
leokan
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-7-3
收藏
得分:0 
回复:(leokan)vb数据库,seek方法,实时错误13,数...
谢谢啦
2007-07-03 20:03
快速回复:vb数据库,seek方法,实时错误13,数据类型不符
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026584 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved