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 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
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
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
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 > > >
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 > > >
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 >> > >> > >> > >> >> > >
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 >> > >> > >> > >> >> > >
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 >> > >> > >> > >> >> > >
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 >> >> > >> >> > >> >> > >> >> >> >> >> > >> > >> >> > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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.
|
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...
|
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...
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
| |