J
Joe via DotNetMonster.com
Hi,
I'm trying to use several select statements so that I don't need to call
the function several times. The next Result set always seems to read the
first select statement. I have the following:
Dim queryString As String = "SELECT TOP 1 ([tblPage].[Part]), [tblPage].
[PageNumber] FROM [tblPage] WHERE ([tblPage].[LessonID] = @LessonID) AND
[tblPage].[Part]='Motivate'; SELECT TOP 1 ([tblPage].[Part]), [tblPage].
[PageNumber] FROM [tblPage] WHERE ([tblPage].[LessonID] = @LessonID) AND
[tblPage].[Part]='Present'"
If (dataReader.Read = True) Then
Dim Part = dataReader("Part")
Response.Write("Part is "&Part)
dataReader.NextResult()
Response.Write("Part is "&Part)
End If
So, I always get the first statement where part=motivate. I don't want to
use a Do While because I'll be doing something different with each result
set. I've just simplified it in the above example.
Thanks so much.
I'm trying to use several select statements so that I don't need to call
the function several times. The next Result set always seems to read the
first select statement. I have the following:
Dim queryString As String = "SELECT TOP 1 ([tblPage].[Part]), [tblPage].
[PageNumber] FROM [tblPage] WHERE ([tblPage].[LessonID] = @LessonID) AND
[tblPage].[Part]='Motivate'; SELECT TOP 1 ([tblPage].[Part]), [tblPage].
[PageNumber] FROM [tblPage] WHERE ([tblPage].[LessonID] = @LessonID) AND
[tblPage].[Part]='Present'"
If (dataReader.Read = True) Then
Dim Part = dataReader("Part")
Response.Write("Part is "&Part)
dataReader.NextResult()
Response.Write("Part is "&Part)
End If
So, I always get the first statement where part=motivate. I don't want to
use a Do While because I'll be doing something different with each result
set. I've just simplified it in the above example.
Thanks so much.