2 Replies - 462 Views - Last Post: 11 November 2012 - 11:35 PM Rate Topic: -----

#1 yuichan59  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 11-November 12

only give 1 value cannot reach EOF. thanks if there some one can help

Posted 11 November 2012 - 10:50 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

Is This A Good Question/Topic? 0
  • +

Replies To: only give 1 value cannot reach EOF. thanks if there some one can help

#2 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 167
  • View blog
  • Posts: 1,908
  • Joined: 13-October 07

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?
Was This Post Helpful? 0
  • +
  • -

#3 yuichan59  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 11-November 12

Re: only give 1 value cannot reach EOF. thanks if there some one can help

Posted 11 November 2012 - 11:35 PM

View Postcalvinthedestroyer, on 11 November 2012 - 11:27 PM, said:

Double check to make sure you DB file is not corrupt?




I already check and my DB is working perfectly...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1