nlko80
September 30th, 2001, 04:49 PM
Ok, what I'm trying to do is bind a MSHFlexgrid control to an ADO Recordset. Everythings fine, the connection is there...but why does it only return one row from the recordset object when there are many rows????
Is there a property i need to set in the Flexgrid control??
Heres my sample code
Private Sub Command1_Click()
Dim db As ADODB.Connection
Dim c As ADODB.Command
Dim rs As ADODB.Recordset
Set db = New ADODB.Connection
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Downloads\Project\Database\HOFAS.mdb;Persist Security Info=False"
db.Open
Set c = New ADODB.Command
c.ActiveConnection = db
c.CommandType = adCmdText
c.CommandText = "Select * from Guest"
Set rs = New ADODB.Recordset
Set rs = c.Execute
Set MSHFlexGrid1.DataSource = rs
-------------------------------------------------
To sum it all up....the Guest table has many records, but only one record is displayed in the MSHFlexGrid...
Is there a property i need to set in the Flexgrid control??
Heres my sample code
Private Sub Command1_Click()
Dim db As ADODB.Connection
Dim c As ADODB.Command
Dim rs As ADODB.Recordset
Set db = New ADODB.Connection
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Downloads\Project\Database\HOFAS.mdb;Persist Security Info=False"
db.Open
Set c = New ADODB.Command
c.ActiveConnection = db
c.CommandType = adCmdText
c.CommandText = "Select * from Guest"
Set rs = New ADODB.Recordset
Set rs = c.Execute
Set MSHFlexGrid1.DataSource = rs
-------------------------------------------------
To sum it all up....the Guest table has many records, but only one record is displayed in the MSHFlexGrid...