Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSHFlexGrid Run-Time Errors 1

Status
Not open for further replies.

jsparks

Programmer
Jan 3, 2001
14
US
Just some more information...

I have verified that my database connection and my recordset are working. If the user types in a catalog page number, the text for a combo box is changed to &quot;page <number>&quot; and the combo box is filled with the product numbers from the correct page.

However, when I remove the code to have a combobox populated with data, and put in &quot;Set MSHFlexGrid1.DataSource = RS&quot; I get the following error message....

Run-time error '30023':
Unable to access data. DataSource settings may be incorrect, or the DataSource functionality may be limited. See help for more information.

It DOES read the field names from the table, and places them across the top off the MSHFlexGrid, but it never populates it with data. I've tried the help and it tells me that the link may be authored incorrectly and that I should search for the topic. I've been searching for 3 days, I could really use some help on this roadblock.

As a recap, what I want to do is display the details of each record found after the person types in a page number.

Thanks a lot for all the help thus far and in the future...hopefully I'll be able to help a new guy/gal out someday.

-Jim Sparks



Here's my good code :
-----
Else
Combo1.Text = &quot;Page &quot; & PageText
Do Until RS.EOF
Combo1.AddItem RS!Style
RS.MoveNext
Loop
RS.Close
Set RS = Nothing
Set CN = Nothing

End If
-----
 
Its simple
When you have created recordset
You must have set its locktype as adlockoptimistic and
cursortype as adopendynamic
change cursortype to adopenstatic
change locktype to adlockreadonly
 
EXCELLENT!

As it turns out, I did have locktype set to readonly, but i had the cursor type set to forwardonly...changing it to STATIC populated my MSHFlexGrid perfectly, thank you very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top