Ask a Question related to ASP.NET General, Design and Development.
-
BethInAK #1
I suck. Very basic question.
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">
<ASP:DropDownList id="orgs" runat="server" AutoPostBack="True"
DataValueField="orgid" datatextfield="organization"
OnSelectedIndexChanged="orgs_SelectedIndexChanged" ></ASP:DropDownList>
<asp:button id="search" onclick="search_click" runat="server"
text="search for data"></asp:button>
</form>
<ASP:DataGrid 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>
</ASP:DataGrid>
</body>
</html>
--
BethF, Anchorage, AK
BethInAK Guest
-
Basic Question
Hello, I've noticed in some sample code that sometimes people use the @ before a string when concatenating them. Example: string filePath =... -
Help with this basic question??
Hello I had a problem, I want to manage some parts of a movie with the F12 function key, but I don?t know how I used this code to other keys but... -
ASP.NET and SSL basic question.
Hi, Apologies if this question is a bit basic, but I can't seem to find any documentation anywhere. I have an asp.net site running on Windows... -
Very basic ASP.NET question
I've got some Java experience but no JSP or ASP and am trying to get to grips with ASP.NET. I'd appreciate some help on a simple question. I... -
XP basic question
Hi, In Windows XP Pro, I only see the most basic of settings for user accounts, even though I am logged in as administrator. How can I change the... -
SStory #2
Re: I suck. Very basic question.
ASP.NET Unleashed is a book I have ordered. It comes highly recommeneded.
Your executereader error--seems like the method expects some parameters
ie. executereader(somethinghere)--check the method syntax
I am new at .NET also--although I was pretty good at ASP.
HTH
Shane
"BethInAK" <beth@alaskapca.org> wrote in message
news:Xns93C069FE735A0bethNOTSObaddawgsina@216.168. 3.44...> 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">
> <ASP:DropDownList id="orgs" runat="server" AutoPostBack="True"
> DataValueField="orgid" datatextfield="organization"
> OnSelectedIndexChanged="orgs_SelectedIndexChanged" ></ASP:DropDownList>
> <asp:button id="search" onclick="search_click" runat="server"
> text="search for data"></asp:button>
> </form>
> <ASP:DataGrid 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>
> </ASP:DataGrid>
> </body>
> </html>
>
>
> --
> BethF, Anchorage, AK
SStory Guest
-
Stephajn Craig #3
Re: I suck. Very basic question.
You seem to be declaring your variables with no datatype or object type so
they are created with an Object datatype. Try using a strongly typed
declaration instead. So dbread would be OleDbReader or something like that.
And, if I recall, the ExecuteReader command shouldn't need any arguments
after you've declared the dbread variable with an OleDbReader datatype.
--
Stephajn Craig
"BethInAK" <beth@alaskapca.org> wrote in message
news:Xns93C069FE735A0bethNOTSObaddawgsina@216.168. 3.44...> 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">
> <ASP:DropDownList id="orgs" runat="server" AutoPostBack="True"
> DataValueField="orgid" datatextfield="organization"
> OnSelectedIndexChanged="orgs_SelectedIndexChanged" ></ASP:DropDownList>
> <asp:button id="search" onclick="search_click" runat="server"
> text="search for data"></asp:button>
> </form>
> <ASP:DataGrid 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>
> </ASP:DataGrid>
> </body>
> </html>
>
>
> --
> BethF, Anchorage, AK
Stephajn Craig Guest
-
Michael Albanese #4
I suck. Very basic question.
Beth,
A very good book is ASP.Net:Tips, Tutorials, and Code by
Scott Mitchell (ISBN:0-672-32143-2). Scott is a great
author and makes things very clear. One quirk of a lot of
examples though is that they do not use a code-behind, so
when you try to run them in the regular Visual Studio
environment they fail. Download the WebMatrix tool from
[url]www.ASP.Net[/url] and run the examples there.
Also, take a look at the website [url]www.4guysfromrolla.com[/url].
This is Scot Mitchell's site and it has many helpful
examples. I started out by working through his 15 part
series on the datagrid. It goes over many of the issues
you are having difficulty with.
My forehead got flat from banging my head on the table
when I started too
Good Luck
Michael
offer, before I>-----Original Message-----
>Thank you in advance for any possible help you have toIts really>pull my hair out!
>
>I am incredibly frustrated attempting to learn asp.net.for a stupid>pissing me off. Please help.
>
>First, please tell me the best asp .net book to purchasewhat most of>beginner, preferably with vb instead of C. I have no idealearn the .net>the c code in my current book means and in trying totemper. I have>stuff at the same time, its giving me quite the crankyso difficult for>a programming background, so I have no idea why this isline>me.
>
>Secondly,the following code gives me an error for thisone or more>dbread=dbcomm.ExecuteReader() saying "no value given forsource=d:\APCA\Technical>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;dataorgs.selecteditem.text>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 =source=d:\APCA\Technical>
> dbconn=New OleDbConnection
>("Provider=Microsoft.Jet.OLEDB.4.0;data& '.' &>Assistance Team\Plan Database\TA_Plans.mdb")
> dbconn.Open()
> sql="SELECT tblOrgs.Organization, [CategoryID]Name,>[SectionNumber] AS [Section], tblSection.SectionName AStblNeeds.AssistanceRequested AS>tblNeeds.NeedID AS [Need Identified],[No Assistance>[Assistance Requested], tblNeeds.NoAssistanceNeeded AStblNeeds ON>Needed] FROM tblSection INNER JOIN (tblOrgs INNER JOINe As EventArgs)>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,EventArgs)> End Sub
>
> Sub orgs_SelectedIndexChanged(sender As Object, e AsAutoPostBack="True">
> End Sub
>
></script>
><html>
><head>
></head>
><body>
> <form runat="server">
> <ASP:DropDownList id="orgs" runat="server"ropDownList>>DataValueField="orgid" datatextfield="organization"
>OnSelectedIndexChanged="orgs_SelectedIndexChanged "></ASP:Drunat="server"> <asp:button id="search" onclick="search_click"Width="100%">text="search for data"></asp:button>
> </form>
> <ASP:DataGrid id="searchresults" runat="server"Size="8pt">BackColor="white" BorderColor="black" ShowFooter="false"
>CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="10pt">Headerstyle-BackColor="lightblue" Headerstyle-Font-backcolor="LightBlue">>Headerstyle-Font-Style="bold" MaintainState="false"
>BorderStyle="Dotted">
> <HeaderStyle font-size="10pt"></HeaderStyle>
> </ASP:DataGrid>
></body>
></html>
>
>
>--
>BethF, Anchorage, AK
>.
>Michael Albanese Guest
-
S. Justin Gengo #5
Re: I suck. Very basic question.
Beth,
It's not a book, but I found the tutorials on the site: [url]www.gotdotnet.com[/url]
extremely helpful in getting started.
They are inside of the "Toolbox" menu on the left bar of the site.
Good Luck!
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"BethInAK" <beth@alaskapca.org> wrote in message
news:Xns93C069FE735A0bethNOTSObaddawgsina@216.168. 3.44...> 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">
> <ASP:DropDownList id="orgs" runat="server" AutoPostBack="True"
> DataValueField="orgid" datatextfield="organization"
> OnSelectedIndexChanged="orgs_SelectedIndexChanged" ></ASP:DropDownList>
> <asp:button id="search" onclick="search_click" runat="server"
> text="search for data"></asp:button>
> </form>
> <ASP:DataGrid 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>
> </ASP:DataGrid>
> </body>
> </html>
>
>
> --
> BethF, Anchorage, AK
S. Justin Gengo Guest
-
Holier Than Thou #6
Re: I suck. Very basic question.
"Michael Albanese" <malbanese@ci.stamford.ct.us> wrote in
news:03cc01c3508e$b02c7eb0$a401280a@phx.gbl:
I am using webmatrix - I figured less was more when learning a new> Beth,
>
> A very good book is ASP.Net:Tips, Tutorials, and Code by
> Scott Mitchell (ISBN:0-672-32143-2). Scott is a great
> author and makes things very clear. One quirk of a lot of
> examples though is that they do not use a code-behind, so
> when you try to run them in the regular Visual Studio
> environment they fail. Download the WebMatrix tool from
> [url]www.ASP.Net[/url] and run the examples there.
language.
> Also, take a look at the website [url]www.4guysfromrolla.com[/url].
> This is Scot Mitchell's site and it has many helpful
> examples. I started out by working through his 15 part
> series on the datagrid. It goes over many of the issues
> you are having difficulty with.
Thanks!!
> My forehead got flat from banging my head on the table
> when I started too
Glad its not just me.
--
BethF, Anchorage, AK
Holier Than Thou Guest



Reply With Quote

