|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to get multi-dataset with TADOQuery
declare @count int
declare @Superior varchar(20) declare @countNum int declare CustCursor Cursor for select superior,count(superior) as RecordeCount from [stuff] group by Superior for read only open custcursor set @count=0 while (1=1) begin Fetch Next from CustCursor into @Superior,@CountNum print @Superior print @countNum if(@@FETCH_STATUS <>0) begin break; end select * From [stuff] where superior=@Superior Set @count=@count+1 end close custcursor deallocate custcursor above is the SQL statement,and How to get multi-dataset use TADOQuery,please!Thanks! |
|
#2
|
||||
|
||||
|
TAdoQuery has a NextRecordSet method that allows you to move from one recordset to the next. See the help documentation for TAdoQuery.NextRecordSet for more details. Hope this helps
![]()
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
I know the TADOQuery's NextRecordSet
I know the TADOQuery's NextRecordSet,but I can't use it correctly
Could you give me some code ! |
|
#4
|
||||
|
||||
|
Drop an ADODataSet component on the form and then do this to move to the next record set:
Code:
while true do begin ADODataSet1.Recordset := ADOQuery1.NextRecordset; if ADODataSet1.IsEmpty then Break; while not ADODataSet1.Eof do begin // Move thru the record set. ADODataSet1.Next; end; end; Note that I typed that code off the top of my head, so you may need to make some minor adjustments. Hope this helps ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > How to get multi-dataset with TADOQuery |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|