Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2003, 01:18 PM
Authorized User
 
Join Date: Nov 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid works / MSFlexGrid doesn't


My computer : Visual Basic 6 (SP3) & Win2K

This works:
  sSQL = ....
  set rs = new ADODB.recordset
  rs.open sSQL, cnn1, adOpenDynamic, adLockPessimistic, adCmdText
  DataGrid1.DataSource = rs
  ....

This doesn't work:
  sSQL = ....
  set rs = new ADODB.recordset
  rs.open sSQL, cnn1, adOpenDynamic, adLockPessimistic, adCmdText
  MSFlex1.DataSource = rs
  ....

generating run-time error 91 "Object variable or with block variable not set"

What the ... is this ? Do I need another patch or what ?
Thanks !

Mike


 
Old November 29th, 2003, 04:34 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

i think that flexgrid is designed only to be set to DAO connection, and can't be set to ADO , so if you need to populate flexgrid you with Ado recordset data you have to make that manually, filling the text value of the cells,

there is also one thing.. MSHFlexGrid control is a hierarchical flexgrid control could be used with ADO, this control could allow hierarchical view for data.

Ahmed Ali
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
MSFlexGrid in VC++ arun.sharma.kumar Visual C++ 0 March 24th, 2007 02:27 AM
MSFlexGrid loveperson Beginning VB 6 1 January 18th, 2005 11:45 AM
Msflexgrid with Textbox Rudner Pro VB 6 2 November 26th, 2004 05:57 AM
MsFlexGrid vs. DataGrid - which ? mike123abc SQL Server 2000 3 November 19th, 2003 11:19 PM
MSFlexGrid meireliezer Visual C++ 0 November 19th, 2003 07:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.