I'm trying to display groups of records with the repeater control in a
loop, whereas each time i iterate i will display the next set of
displaygroups. My sql,databind strings are :
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim strConn as string
="Provider=SQLO LEDB;SERVER=xxx .xx.xx.xxx;UID= sa;PWD=xxxxx;DA TABASE=productc at;"
Dim strSQL as string ="select * from category where displaygroup = d"
Dim Conn as New OLEDBConnection (strConn)
Dim Cmd as New OLEDBCommand(st rSQL,Conn)
Conn.Open()
thedata.DataSou rce =
Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
thedata.DataBin d()
End Sub
</script>
I'm trying to loop thru the database until i run out of records:
<ASP:Repeater id="thedata" runat="server">
<itemtemplate>< %dim d
d= 1
if thedata.databin d() not eof then
d = d +1
end if
%>
<%# Container.DataI tem("CName")%>
</ItemTemplate>
</ASP:Repeater>
...getting "Expression does not produce a value" error. The
thedata.databin d() method is where i'm having problems
loop, whereas each time i iterate i will display the next set of
displaygroups. My sql,databind strings are :
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim strConn as string
="Provider=SQLO LEDB;SERVER=xxx .xx.xx.xxx;UID= sa;PWD=xxxxx;DA TABASE=productc at;"
Dim strSQL as string ="select * from category where displaygroup = d"
Dim Conn as New OLEDBConnection (strConn)
Dim Cmd as New OLEDBCommand(st rSQL,Conn)
Conn.Open()
thedata.DataSou rce =
Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
thedata.DataBin d()
End Sub
</script>
I'm trying to loop thru the database until i run out of records:
<ASP:Repeater id="thedata" runat="server">
<itemtemplate>< %dim d
d= 1
if thedata.databin d() not eof then
d = d +1
end if
%>
<%# Container.DataI tem("CName")%>
</ItemTemplate>
</ASP:Repeater>
...getting "Expression does not produce a value" error. The
thedata.databin d() method is where i'm having problems
Comment