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
|
|
|
 |
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 |
 |
 |
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 ?
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 |
 |
 |
Kaaer
|
| Posted: 08/01/2005, 12:13 PM |
|
Peter R
Thank you 
Regards
Kaare Simensen
Alta, Norway
|
|
|
 |