|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: Wed Oct 24, 2007 2:59 am
a confused problem between databases variables and database records |
I meet a problem now.
when use one trigger to set the value of record in database, the record not be set but some database variables are created.
for example.
trigger pattern {....(*)...(*)}
{#dbload qu;1qu.Name=%1;1qu.Type=%2}
"1qu" is the existing record in qu database. but the result shows this record not be set value and a new database variable "1qu" is created.
anyone could give me a hand?
thanks |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Oct 24, 2007 3:55 am |
I would have to double check some of my really old scripts to make sure this is right, but It think it should work for a script. The final #DBPUT might not even be necessary, but I don't recall ever checking it specifically, I do remember noticing something odd that made me think that.
#dbload qu;#DBGET 1qu;#ADDKEY {%rec} {Name} {%1};#ADDKEY {%rec} {Type} {%2};#DBPUT %rec |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: Wed Oct 24, 2007 4:53 am |
Vijilante,
not work with the scripts. still create database variable and not update the record of database.
need some special settings? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Oct 24, 2007 5:43 am |
I can't quite follow what you mean by this?
Quote: |
not work with the scripts. still create database variable and not update the record of database. |
Perhaps a few full sentences explaining what is going wrong, followed by a few more full setences explaining what you want to do, would actually get me to understand.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: Wed Oct 24, 2007 6:24 am |
ok!
I just wanna get the value from trigger pattern and set them to the record of database.
with these scripts above,the value only be set to a new database variable not the record of database.
such as the following scripts.
#dbload qu;#DBGET 1qu;#ADDKEY {%rec} {Name} {%1};#ADDKEY {%rec} {Type} {%2};#DBPUT %rec
or
{#dbload qu;1qu.Name=%1;1qu.Type=%2}
the result in my zmud is that the database variable "1qu" is created and the record "1qu" not to be set value.
actually I ever did set the value of record successfully by these scripts but not always.I'm not sure what happen. |
|
|
|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: Wed Oct 24, 2007 6:44 am |
I found the record number of database is not unique. there are serval same record numbers existing in one database after executing triggers serval times. but the value of record still not be set correctly. would it be a bug problem?
|
|
|
|
|
|