CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Variable is undefined... after using a sql select - anyone who can help?

Print topic Send  topic

Author Message
Kaare
Posted: 08/01/2005, 4:37 AM

I have a table that I update called KampOpp. Before I update this table, I need to get data from a table called Resultater.
This is what I do after define Sql and errormessages.

SET CONN = NEW clsDBAltaturnAdm
conn.open

sql6= "Select * from Resultater where kampnr = "&kampnummer

conn.execute(sql6)
errormessage6 = CCProcessError(conn)

FHmal = Resultater.Hmaal.value
FBmal = Resultater.BMaal.value

Error message that occurs is like this:
Variable is undefined: Resultater

What do I wrong?? In my form I have make table/query where Resultater is.

Regards
Kaare Simensen
Kaare
Posted: 08/01/2005, 4:54 AM

I forgot to say that the error occurs when I do this:
Fhmal = resultater.Hmaal.value

Regards'
Kåre:-P
mrachow


Posts: 509
Posted: 08/01/2005, 5:43 AM

Not sure if this is the problem but ...

Resultater is the name of your form?
By saying
Quote :
Resultater.Hmaal.value
you are referring the value of control Hmaal on form Resultater not column Hmaal of database table Resultater.

_________________
Best regards,
Michael
View profile  Send private message
Kaare
Posted: 08/01/2005, 6:14 AM

Hi Michael
First, Resultater is a table and not a form.
After your answer, I try to make this:

FHmal = resultater.Hmaal - (Hmaal is a column in table Resultater)
but the same error occors :
Quote :
Variable is undefined: 'resultater'


Can you give a hint ?:-P
Regards
Kaare
peterr


Posts: 5971
Posted: 08/01/2005, 10:00 AM

You cannot use such syntax at all for retrieving SQL results. This syntax is valid only when you have a form with controls, and then you can refer to FormName.ControlName.Value.
In your case you should use the standard ASP syntax. There is such code in some of CCS examples, plus in the documentation at http://docs.codecharge.com/studio/html/ProgrammingTechn...leDBValues.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Kaaer
Posted: 08/01/2005, 12:13 PM

Peter R

Thank you :-)
Regards

Kaare Simensen
Alta, Norway

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.