473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Does anyone see my mistake?

Does anyone see my mistake? I'm trying to load the school dropdownlist when
the user select a state from the state dropdownlist. The states drop down
list loads, but the school drop down list donot.

****Database Object Class........................

' Methods
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Public Function GetStateList() As DataSet
Return RunProcedure( _
"GetState", New IDataParameter() {}, "States")
End Function

Public Function GetSchoolByStateList(ByVal StateID As String) As
DataSet
Dim parameters As SqlParameter() = { _
New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
parameters(0).Value = StateID
Return RunProcedure( _
"GetSchoolByState", New IDataParameter() {}, "SchoolByState")
End Function

****Business Object Class........................

' Private variables
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Private Shared myStateID As String

' Methods
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Public Shared Function GetStates() As DataSet

Dim tool As New StuLotto.Accounts.Data.AccountsTool

Return tool.GetStateList

End Function

Public Shared Function GetSchoolByState() As DataSet

Dim tool As New StuLotto.Accounts.Data.AccountsTool

Return tool.GetSchoolByStateList(myStateID)

' Properties
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Public Shared Property StateID() As String
Get
Return myStateID
End Get
Set(ByVal value As String)
myStateID = value
End Set
End Property

End Class

End Function

****.aspx Codebehind page...........................

' Bind the state drop-down combobox
Dim States As New DataSet
States = Accounts.Business.AccountsTool.GetStates
SStateDDL.DataSource = States
SStateDDL.DataTextField = "Description"
SStateDDL.DataValueField = "StateID"
SStateDDL.DataBind()

' Bind the school by selected state drop-down combobox
Private Sub SStateDDL_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SStateDDL.SelectedIndexChanged
Dim Schools As New DataSet
Dim Value As String = _
Accounts.Business.AccountsTool.StateID =
SStateDDL.SelectedItem.Value
Schools = Accounts.Business.AccountsTool.GetSchoolByState
SNameDDL.DataSource = Schools
SNameDDL.DataTextField = "SchoolName"
SNameDDL.DataValueField = "SchoolID"
SNameDDL.DataBind()
End Sub
Nov 18 '05 #1
9 1043

"Leon" <vn*****@msn.com> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
Does anyone see my mistake? I'm trying to load the school dropdownlist
when the user select a state from the state dropdownlist. The states drop
down list loads, but the school drop down list donot.

****Database Object Class........................

' Methods
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -


You are not passing the @StateID parameter into RunProcedure.

Shouldn't this be

Public Function GetSchoolByStateList(ByVal StateID As String) As
DataSet
Dim parameters As SqlParameter() = { _
New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
parameters(0).Value = StateID
Return RunProcedure( _
"GetSchoolByState", parameters, "SchoolByState")
End Function

?

David

Nov 18 '05 #2
Thanks for you response!
yes, "Return RunProcedure( "GetSchoolByState", parameters,
"SchoolByState")" you are right do you see any more errors?

"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:Oy**************@TK2MSFTNGP09.phx.gbl...

"Leon" <vn*****@msn.com> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
Does anyone see my mistake? I'm trying to load the school dropdownlist
when the user select a state from the state dropdownlist. The states drop
down list loads, but the school drop down list donot.

****Database Object Class........................

' Methods

'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -


You are not passing the @StateID parameter into RunProcedure.

Shouldn't this be

Public Function GetSchoolByStateList(ByVal StateID As String) As
DataSet
Dim parameters As SqlParameter() = { _
New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
parameters(0).Value = StateID
Return RunProcedure( _
"GetSchoolByState", parameters, "SchoolByState")
End Function

?

David

Nov 18 '05 #3
Are you able to run this in the debugger?

Jeff

"Leon" <vn*****@msn.com> wrote in message
news:#1**************@TK2MSFTNGP14.phx.gbl...
Thanks for you response!
yes, "Return RunProcedure( "GetSchoolByState", parameters,
"SchoolByState")" you are right do you see any more errors?

"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:Oy**************@TK2MSFTNGP09.phx.gbl...

"Leon" <vn*****@msn.com> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
Does anyone see my mistake? I'm trying to load the school dropdownlist
when the user select a state from the state dropdownlist. The states drop down list loads, but the school drop down list donot.

****Database Object Class........................

' Methods

'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


You are not passing the @StateID parameter into RunProcedure.

Shouldn't this be

Public Function GetSchoolByStateList(ByVal StateID As String) As
DataSet
Dim parameters As SqlParameter() = { _
New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
parameters(0).Value = StateID
Return RunProcedure( _
"GetSchoolByState", parameters, "SchoolByState")
End Function

?

David


Nov 18 '05 #4
well I'm programming in vs.net 2003. I think I know how to efficiently run
the debugger.

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Are you able to run this in the debugger?

Jeff

"Leon" <vn*****@msn.com> wrote in message
news:#1**************@TK2MSFTNGP14.phx.gbl...
Thanks for you response!
yes, "Return RunProcedure( "GetSchoolByState", parameters,
"SchoolByState")" you are right do you see any more errors?

"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:Oy**************@TK2MSFTNGP09.phx.gbl...
>
> "Leon" <vn*****@msn.com> wrote in message
> news:OD**************@TK2MSFTNGP11.phx.gbl...
>> Does anyone see my mistake? I'm trying to load the school dropdownlist
>> when the user select a state from the state dropdownlist. The states drop >> down list loads, but the school drop down list donot.
>>
>> ****Database Object Class........................
>>
>> ' Methods
>>
>> '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - -
>>
>
> You are not passing the @StateID parameter into RunProcedure.
>
> Shouldn't this be
>
> Public Function GetSchoolByStateList(ByVal StateID As String) As
> DataSet
> Dim parameters As SqlParameter() = { _
> New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
> parameters(0).Value = StateID
> Return RunProcedure( _
> "GetSchoolByState", parameters, "SchoolByState")
> End Function
>
> ?
>
> David
>
>
>



Nov 18 '05 #5
So does it work in the debugger or not? Can you set breakpoints to see the
execution, and view the variables as you expect?

Jeff
"Leon" <vn*****@msn.com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
well I'm programming in vs.net 2003. I think I know how to efficiently run
the debugger.

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Are you able to run this in the debugger?

Jeff

"Leon" <vn*****@msn.com> wrote in message
news:#1**************@TK2MSFTNGP14.phx.gbl...
Thanks for you response!
yes, "Return RunProcedure( "GetSchoolByState", parameters,
"SchoolByState")" you are right do you see any more errors?

"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:Oy**************@TK2MSFTNGP09.phx.gbl...
>
> "Leon" <vn*****@msn.com> wrote in message
> news:OD**************@TK2MSFTNGP11.phx.gbl...
>> Does anyone see my mistake? I'm trying to load the school dropdownlist >> when the user select a state from the state dropdownlist. The states

drop
>> down list loads, but the school drop down list donot.
>>
>> ****Database Object Class........................
>>
>> ' Methods
>>
>>

'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> - - -
>>
>
> You are not passing the @StateID parameter into RunProcedure.
>
> Shouldn't this be
>
> Public Function GetSchoolByStateList(ByVal StateID As String) As > DataSet
> Dim parameters As SqlParameter() = { _
> New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
> parameters(0).Value = StateID
> Return RunProcedure( _
> "GetSchoolByState", parameters, "SchoolByState")
> End Function
>
> ?
>
> David
>
>
>



Nov 18 '05 #6
my get set accessor function is not working, I'm trying to figure-out why?
PLEASE HELP!
"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:ef**************@TK2MSFTNGP15.phx.gbl...
So does it work in the debugger or not? Can you set breakpoints to see
the
execution, and view the variables as you expect?

Jeff
"Leon" <vn*****@msn.com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
well I'm programming in vs.net 2003. I think I know how to efficiently
run
the debugger.

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
> Are you able to run this in the debugger?
>
> Jeff
>
> "Leon" <vn*****@msn.com> wrote in message
> news:#1**************@TK2MSFTNGP14.phx.gbl...
>> Thanks for you response!
>> yes, "Return RunProcedure( "GetSchoolByState", parameters,
>> "SchoolByState")" you are right do you see any more errors?
>>
>> "David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
>> message news:Oy**************@TK2MSFTNGP09.phx.gbl...
>> >
>> > "Leon" <vn*****@msn.com> wrote in message
>> > news:OD**************@TK2MSFTNGP11.phx.gbl...
>> >> Does anyone see my mistake? I'm trying to load the school dropdownlist >> >> when the user select a state from the state dropdownlist. The
>> >> states
> drop
>> >> down list loads, but the school drop down list donot.
>> >>
>> >> ****Database Object Class........................
>> >>
>> >> ' Methods
>> >>
>> >>
> '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> >> - - -
>> >>
>> >
>> > You are not passing the @StateID parameter into RunProcedure.
>> >
>> > Shouldn't this be
>> >
>> > Public Function GetSchoolByStateList(ByVal StateID As String) As >> > DataSet
>> > Dim parameters As SqlParameter() = { _
>> > New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
>> > parameters(0).Value = StateID
>> > Return RunProcedure( _
>> > "GetSchoolByState", parameters, "SchoolByState")
>> > End Function
>> >
>> > ?
>> >
>> > David
>> >
>> >
>> >
>>
>>
>
>



Nov 18 '05 #7
I can't help unless you answer my questions. I ask specific questions, and
require specific answers.

"Leon" <vn*****@msn.com> wrote in message
news:ek**************@TK2MSFTNGP09.phx.gbl...
my get set accessor function is not working, I'm trying to figure-out why?
PLEASE HELP!
"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:ef**************@TK2MSFTNGP15.phx.gbl...
So does it work in the debugger or not? Can you set breakpoints to see
the
execution, and view the variables as you expect?

Jeff
"Leon" <vn*****@msn.com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
well I'm programming in vs.net 2003. I think I know how to efficiently
run
the debugger.

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
> Are you able to run this in the debugger?
>
> Jeff
>
> "Leon" <vn*****@msn.com> wrote in message
> news:#1**************@TK2MSFTNGP14.phx.gbl...
>> Thanks for you response!
>> yes, "Return RunProcedure( "GetSchoolByState", parameters,
>> "SchoolByState")" you are right do you see any more errors?
>>
>> "David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in >> message news:Oy**************@TK2MSFTNGP09.phx.gbl...
>> >
>> > "Leon" <vn*****@msn.com> wrote in message
>> > news:OD**************@TK2MSFTNGP11.phx.gbl...
>> >> Does anyone see my mistake? I'm trying to load the school

dropdownlist
>> >> when the user select a state from the state dropdownlist. The
>> >> states
> drop
>> >> down list loads, but the school drop down list donot.
>> >>
>> >> ****Database Object Class........................
>> >>
>> >> ' Methods
>> >>
>> >>
> '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> >> - - -
>> >>
>> >
>> > You are not passing the @StateID parameter into RunProcedure.
>> >
>> > Shouldn't this be
>> >
>> > Public Function GetSchoolByStateList(ByVal StateID As
String) As
>> > DataSet
>> > Dim parameters As SqlParameter() = { _
>> > New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
>> > parameters(0).Value = StateID
>> > Return RunProcedure( _
>> > "GetSchoolByState", parameters, "SchoolByState")
>> > End Function
>> >
>> > ?
>> >
>> > David
>> >
>> >
>> >
>>
>>
>
>



Nov 18 '05 #8
Leon, see my response to your identical post from last night--it's very odd
that your get/set accessor is playing with a *shared* variable, not to
mention that you're then touching that private variable again from within
GetSchoolByState. As for efficiently using the debugger, that may be, but
you're sure not giving anybody reason to believe that you're tracing through
the code and setting watchpoints on the value you're losing.

Bill

"Leon" wrote:
my get set accessor function is not working, I'm trying to figure-out why?
PLEASE HELP!
"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:ef**************@TK2MSFTNGP15.phx.gbl...
So does it work in the debugger or not? Can you set breakpoints to see
the
execution, and view the variables as you expect?

Jeff
"Leon" <vn*****@msn.com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
well I'm programming in vs.net 2003. I think I know how to efficiently
run
the debugger.

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
> Are you able to run this in the debugger?
>
> Jeff
>
> "Leon" <vn*****@msn.com> wrote in message
> news:#1**************@TK2MSFTNGP14.phx.gbl...
>> Thanks for you response!
>> yes, "Return RunProcedure( "GetSchoolByState", parameters,
>> "SchoolByState")" you are right do you see any more errors?
>>
>> "David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
>> message news:Oy**************@TK2MSFTNGP09.phx.gbl...
>> >
>> > "Leon" <vn*****@msn.com> wrote in message
>> > news:OD**************@TK2MSFTNGP11.phx.gbl...
>> >> Does anyone see my mistake? I'm trying to load the school

dropdownlist
>> >> when the user select a state from the state dropdownlist. The
>> >> states
> drop
>> >> down list loads, but the school drop down list donot.
>> >>
>> >> ****Database Object Class........................
>> >>
>> >> ' Methods
>> >>
>> >>
> '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> >> - - -
>> >>
>> >
>> > You are not passing the @StateID parameter into RunProcedure.
>> >
>> > Shouldn't this be
>> >
>> > Public Function GetSchoolByStateList(ByVal StateID As String)

As
>> > DataSet
>> > Dim parameters As SqlParameter() = { _
>> > New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
>> > parameters(0).Value = StateID
>> > Return RunProcedure( _
>> > "GetSchoolByState", parameters, "SchoolByState")
>> > End Function
>> >
>> > ?
>> >
>> > David
>> >
>> >
>> >
>>
>>
>
>



Nov 18 '05 #9
I got it! Thanks for all the help!!!!
"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Leon, see my response to your identical post from last night--it's very
odd
that your get/set accessor is playing with a *shared* variable, not to
mention that you're then touching that private variable again from within
GetSchoolByState. As for efficiently using the debugger, that may be, but
you're sure not giving anybody reason to believe that you're tracing
through
the code and setting watchpoints on the value you're losing.

Bill

"Leon" wrote:
my get set accessor function is not working, I'm trying to figure-out
why?
PLEASE HELP!
"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:ef**************@TK2MSFTNGP15.phx.gbl...
> So does it work in the debugger or not? Can you set breakpoints to see
> the
> execution, and view the variables as you expect?
>
> Jeff
> "Leon" <vn*****@msn.com> wrote in message
> news:uH**************@TK2MSFTNGP12.phx.gbl...
>> well I'm programming in vs.net 2003. I think I know how to efficiently
>> run
>> the debugger.
>>
>> "Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
>> news:%2******************@TK2MSFTNGP10.phx.gbl...
>> > Are you able to run this in the debugger?
>> >
>> > Jeff
>> >
>> > "Leon" <vn*****@msn.com> wrote in message
>> > news:#1**************@TK2MSFTNGP14.phx.gbl...
>> >> Thanks for you response!
>> >> yes, "Return RunProcedure( "GetSchoolByState", parameters,
>> >> "SchoolByState")" you are right do you see any more errors?
>> >>
>> >> "David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote
>> >> in
>> >> message news:Oy**************@TK2MSFTNGP09.phx.gbl...
>> >> >
>> >> > "Leon" <vn*****@msn.com> wrote in message
>> >> > news:OD**************@TK2MSFTNGP11.phx.gbl...
>> >> >> Does anyone see my mistake? I'm trying to load the school
> dropdownlist
>> >> >> when the user select a state from the state dropdownlist. The
>> >> >> states
>> > drop
>> >> >> down list loads, but the school drop down list donot.
>> >> >>
>> >> >> ****Database Object Class........................
>> >> >>
>> >> >> ' Methods
>> >> >>
>> >> >>
>> > '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> > - -
>> >> >> - - -
>> >> >>
>> >> >
>> >> > You are not passing the @StateID parameter into RunProcedure.
>> >> >
>> >> > Shouldn't this be
>> >> >
>> >> > Public Function GetSchoolByStateList(ByVal StateID As
>> >> > String)
> As
>> >> > DataSet
>> >> > Dim parameters As SqlParameter() = { _
>> >> > New SqlParameter("@StateID", SqlDbType.VarChar, 2)}
>> >> > parameters(0).Value = StateID
>> >> > Return RunProcedure( _
>> >> > "GetSchoolByState", parameters, "SchoolByState")
>> >> > End Function
>> >> >
>> >> > ?
>> >> >
>> >> > David
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roy Yao | last post by:
Does it mean "(sizeof(int))* (p)" or "sizeof( (int)(*p) )" ? According to my analysis, operator sizeof, (type) and * have the same precedence, and they combine from right to left. Then this...
8
by: lawrence | last post by:
I'm learning Javascript. I downloaded a script for study. Please tell me how the variable "loop" can have scope in the first function when it is altered in the second function? It is not defined...
7
by: jan.dostrasil | last post by:
Hello, I'm new to c - so sorry if this is off topic here, please advice at least where should i ask... ;) I have a program in c which is working fine, it reads everything from pipe, modifies...
45
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
34
by: NewToCPP | last post by:
Hi, Why does a C/C++ programs crash? When there is access to a null pointer or some thing like that programs crash, but why do they crash? Thanks.
3
by: Pavel | last post by:
I tried to do very simple operation, at least I thought it will be simple, and it is to use String.Format. But, when formatted string bigger than 255 I got this mistake "Input string was not in a...
2
by: Terry On Windigo | last post by:
I must have forgotten someting. I did something like this about 4 years ago and got it to work. Now I need to do it again and I get this error message: Technical Information (for support...
17
by: seajay | last post by:
Hello, I noticed something strange when I was composing a XHTML document with CSS The following DOCTYPE causes the page to display differently on Fireflox 1.0.6 and Internet Explorer 6...
13
by: Anonymous | last post by:
On MS site: http://msdn2.microsoft.com/en-us/library/esew7y1w(VS.80).aspx is the following garbled rambling: "You can avoid exporting classes by defining a DLL that defines a class with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.