B
BethInAK
Thank you in advance for any possible help you have to offer, before I
pull my hair out!
I am incredibly frustrated attempting to learn asp.net. Its really
pissing me off. Please help.
First, please tell me the best asp .net book to purchase for a stupid
beginner, preferably with vb instead of C. I have no idea what most of
the c code in my current book means and in trying to learn the .net
stuff at the same time, its giving me quite the cranky temper. I have
a programming background, so I have no idea why this is so difficult for
me.
Secondly,the following code gives me an error for this line
dbread=dbcomm.ExecuteReader() saying "no value given for one or more
parameters". Whats going on, please?
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;data source=d:\APCA\Technical
Assistance Team\Plan Database\TA_Plans.mdb")
dbconn.Open()
sql="SELECT * FROM tblorgs order by organization"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
orgs.DataSource=dbread
orgs.DataBind()
dbread.Close()
dbconn.Close()
end sub
Sub Search_click(s as object, e as eventargs)
dim dbconn,sql,dbcomm,dbread
Dim filtervalue as string = orgs.selecteditem.text
dbconn=New OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;data source=d:\APCA\Technical
Assistance Team\Plan Database\TA_Plans.mdb")
dbconn.Open()
sql="SELECT tblOrgs.Organization, [CategoryID] & '.' &
[SectionNumber] AS [Section], tblSection.SectionName AS Name,
tblNeeds.NeedID AS [Need Identified], tblNeeds.AssistanceRequested AS
[Assistance Requested], tblNeeds.NoAssistanceNeeded AS [No Assistance
Needed] FROM tblSection INNER JOIN (tblOrgs INNER JOIN tblNeeds ON
tblOrgs.OrgID = tblNeeds.OrgID) ON tblSection.SectionID =
tblNeeds.SectionID where tblOrgs.OrgdID= " & filterValue
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
SEARCHRESULTS.DataSource=dbread
searchresults.DataBind()
dbread.Close()
dbconn.Close()
END SUB
Sub DataList1_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
Sub orgs_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<ASPropDownList id="orgs" runat="server" AutoPostBack="True"
DataValueField="orgid" datatextfield="organization"
OnSelectedIndexChanged="orgs_SelectedIndexChanged"></ASPropDownList>
<asp:button id="search" onclick="search_click" runat="server"
text="search for data"></asp:button>
</form>
<ASPataGrid id="searchresults" runat="server" Width="100%"
BackColor="white" BorderColor="black" ShowFooter="false"
CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt"
Headerstyle-BackColor="lightblue" Headerstyle-Font-Size="10pt"
Headerstyle-Font-Style="bold" MaintainState="false"
BorderStyle="Dotted">
<HeaderStyle font-size="10pt" backcolor="LightBlue">
</HeaderStyle>
</ASPataGrid>
</body>
</html>
pull my hair out!
I am incredibly frustrated attempting to learn asp.net. Its really
pissing me off. Please help.
First, please tell me the best asp .net book to purchase for a stupid
beginner, preferably with vb instead of C. I have no idea what most of
the c code in my current book means and in trying to learn the .net
stuff at the same time, its giving me quite the cranky temper. I have
a programming background, so I have no idea why this is so difficult for
me.
Secondly,the following code gives me an error for this line
dbread=dbcomm.ExecuteReader() saying "no value given for one or more
parameters". Whats going on, please?
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;data source=d:\APCA\Technical
Assistance Team\Plan Database\TA_Plans.mdb")
dbconn.Open()
sql="SELECT * FROM tblorgs order by organization"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
orgs.DataSource=dbread
orgs.DataBind()
dbread.Close()
dbconn.Close()
end sub
Sub Search_click(s as object, e as eventargs)
dim dbconn,sql,dbcomm,dbread
Dim filtervalue as string = orgs.selecteditem.text
dbconn=New OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;data source=d:\APCA\Technical
Assistance Team\Plan Database\TA_Plans.mdb")
dbconn.Open()
sql="SELECT tblOrgs.Organization, [CategoryID] & '.' &
[SectionNumber] AS [Section], tblSection.SectionName AS Name,
tblNeeds.NeedID AS [Need Identified], tblNeeds.AssistanceRequested AS
[Assistance Requested], tblNeeds.NoAssistanceNeeded AS [No Assistance
Needed] FROM tblSection INNER JOIN (tblOrgs INNER JOIN tblNeeds ON
tblOrgs.OrgID = tblNeeds.OrgID) ON tblSection.SectionID =
tblNeeds.SectionID where tblOrgs.OrgdID= " & filterValue
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
SEARCHRESULTS.DataSource=dbread
searchresults.DataBind()
dbread.Close()
dbconn.Close()
END SUB
Sub DataList1_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
Sub orgs_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<ASPropDownList id="orgs" runat="server" AutoPostBack="True"
DataValueField="orgid" datatextfield="organization"
OnSelectedIndexChanged="orgs_SelectedIndexChanged"></ASPropDownList>
<asp:button id="search" onclick="search_click" runat="server"
text="search for data"></asp:button>
</form>
<ASPataGrid id="searchresults" runat="server" Width="100%"
BackColor="white" BorderColor="black" ShowFooter="false"
CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt"
Headerstyle-BackColor="lightblue" Headerstyle-Font-Size="10pt"
Headerstyle-Font-Style="bold" MaintainState="false"
BorderStyle="Dotted">
<HeaderStyle font-size="10pt" backcolor="LightBlue">
</HeaderStyle>
</ASPataGrid>
</body>
</html>