parsing state table (vortex)

chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

parsing state table (vortex)

Post by chand012 »

Do you have a routine for parsing the key/value pairs stored in the Vars column of the vortex table?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

parsing state table (vortex)

Post by Kai »

No. The format is basically:

var&type&num=[value[&value...]][&var&type&num=...]

where `var' is the variable name (URL-encoded), `type' is the internal SQL type of the variable as a decimal int (eg. 66 = varchar, 7 = int, 9 = long, 19 = counter etc.), `num' is the number of values, and `value' is the URL-encoded value, cast to a string first. Note that this is an internal format and is subject to change without notice (though it never has...).
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

parsing state table (vortex)

Post by chand012 »

Thanks for the info. I would have never figured that out! By the way, for varchars, it appears that the format is var&66&1=length&value, where length is the length of the string.
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

parsing state table (vortex)

Post by Kai »

Right; varchar and varbyte have a length in case of nuls.