PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework OleDbCommand and OleDbDataReader

Reply

OleDbCommand and OleDbDataReader

 
Thread Tools Rate Thread
Old 14-01-2006, 06:55 AM   #1
Nathan Franklin
Guest
 
Posts: n/a
Default OleDbCommand and OleDbDataReader


hello list,

when working with the oledbcommand object, i need to open more then one
recordset at a time, when i try to have multiple recordsets opening from the
one command i get the error "the oledbcommand is currently open, busy
fetching" I dont see why this should be a problem...

A copy of my code is below...

Sql = "Select PS.ID,SV.StaticValue As PanelName From ReportRoomPanelStore
PS,ReportRoomStaticValues SV Where PS.ReportID='" & SQLIT(ReportID) & "' And
PS.PanelStaticID = SV.ID Order By PS.OrderID"
cmd.CommandText = Sql
rsPanels = cmd.ExecuteReader
While rsPanels.Read
Sql = "Select GS.ID,SV.StaticValue As GroupName From
ReportRoomGroupStore GS,ReportRoomStaticValues SV Where GS.PanelID='" &
SQLIT(rsPanels("ID")) & "' And GS.GroupStaticID = SV.ID Order By GS.OrderID"
cmd.CommandText = Sql <---- ERRORS ON THIS LINE HERE for the error
message above....
rsGroups = cmd.ExecuteReader
End WHile

If anyone could help me that would be great


  Reply With Quote
Old 14-01-2006, 10:32 AM   #2
Peter Foot [MVP]
Guest
 
Posts: n/a
Default Re: OleDbCommand and OleDbDataReader

OleDbCommand isn't a compact framework feature, try posting to
microsoft.public.dotnet.framework.adonet

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net

"Nathan Franklin" <nathan@tsn.cc> wrote in message
news:dqa7ai$j6g$1@news-02.connect.com.au...
> hello list,
>
> when working with the oledbcommand object, i need to open more then one
> recordset at a time, when i try to have multiple recordsets opening from
> the one command i get the error "the oledbcommand is currently open, busy
> fetching" I dont see why this should be a problem...
>
> A copy of my code is below...
>
> Sql = "Select PS.ID,SV.StaticValue As PanelName From ReportRoomPanelStore
> PS,ReportRoomStaticValues SV Where PS.ReportID='" & SQLIT(ReportID) & "'
> And PS.PanelStaticID = SV.ID Order By PS.OrderID"
> cmd.CommandText = Sql
> rsPanels = cmd.ExecuteReader
> While rsPanels.Read
> Sql = "Select GS.ID,SV.StaticValue As GroupName From
> ReportRoomGroupStore GS,ReportRoomStaticValues SV Where GS.PanelID='" &
> SQLIT(rsPanels("ID")) & "' And GS.GroupStaticID = SV.ID Order By
> GS.OrderID"
> cmd.CommandText = Sql <---- ERRORS ON THIS LINE HERE for the error
> message above....
> rsGroups = cmd.ExecuteReader
> End WHile
>
> If anyone could help me that would be great
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off