Private Sub DataCombo1_Change()
Dim sqlstr As String
Dim cn As ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = New ADODB.Connection
cn.ConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\2ndtry\DATABASE\Database1.mdb;Persist Security Info=False")
cn.Open
sqlstr = "select * from ITEM where type='" & DataCombo1.Text & "' and flag='1'"
Set rs = cn.Execute(sqlstr, opendbdynaset)
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.refresh
End Sub
2 Replies - 296 Views - Last Post: 11 November 2012 - 11:35 PM
#1
only give 1 value cannot reach EOF. thanks if there some one can help
Posted 11 November 2012 - 10:50 PM
Replies To: only give 1 value cannot reach EOF. thanks if there some one can help
#2
Re: only give 1 value cannot reach EOF. thanks if there some one can help
Posted 11 November 2012 - 11:27 PM
Private Sub DataCombo1_Change()
Dim sqlstr As String
Dim cn As ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = New ADODB.Connection
cn.ConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\2ndtry\DATABASE\Database1.mdb;Persist Security Info=False")
cn.Open
sqlstr = "select * from ITEM where type='" & DataCombo1.Text & "' and flag='1'"
Set rs = cn.Execute(sqlstr, opendbdynaset)
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.refresh
End Sub
Double check to make sure you DB file is not corrupt?
#3
Re: only give 1 value cannot reach EOF. thanks if there some one can help
Posted 11 November 2012 - 11:35 PM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|