If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > MSHflexgrid Problem when recorset is null

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-15-04, 03:58
latief786 latief786 is offline
Registered User
 
Join Date: Aug 2004
Posts: 1
MSHflexgrid Problem when recorset is null

Hi All,

I have problem with MSHFlexgrid ,if the recordset is null then the cursor not perform anything i.e
if recordset return null then click or double click events on the mshflexgrid its not performing any action,
i have to close the form and open it again.

below is my code

vstr = " select * from emp"
Set adoRS = New ADODB.Recordset
adoRS.Open vstr, db, , adLockOptimistic
Set MSHflexgrid.DataSource = adoRS
adoRS.Close
Set adoRS = Nothing

Thanks in advance,
I really appreciate if any help.
Reply With Quote
  #2 (permalink)  
Old 08-17-04, 06:12
Marvels Marvels is offline
Registered User
 
Join Date: Jul 2003
Location: Amsterdam, Nederland
Posts: 449
If there is data in your SQL-Query
Set the bookmark of the grid to the first row

if they click a row set it to that row
otherwise your select/dubble-click function wont work (row/ID will be NULL)
because its has'nt a active row/ID


if there is no data trap it and set the function to disabled
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On