Hello!
For my diploma thesis I need to specify a rather simple format for
replicating data from one SQL Server to another. I want to write the
definition in ASN.1. Right now I got this far:
IMEX DEFINITIONS ::=
BEGIN
DataStream ::= SEQUENCE
{
streamHeader OCTET STRING("SOM1"),
tableDump SEQUENCE OF TableDump DEFAULT {},
StreamEnd
}
TableDump ::= SEQUENCE
{
header TableHeader,
data SEQUENCE OF TableData DEFAULT {}
}
TableHeader ::= SEQUENCE
{
identifier INTEGER(2..4),
tablename String,
numColumns Length, -- [Line 23]
columnNames SEQUENCE SIZE(numColumns) OF String -- [Line 24]
}
TableData ::= SEQUENCE
{
idenitfier INTEGER(1),
columnData SEQUENCE SIZE(numColumns) OF String -- [Line 30]
}
String ::= SEQUENCE
{
numChars Length, -- [Line 35]
data OCTET STRING (SIZE(numChars)) -- [Line 36]
}
Length ::= INTEGER(0..2147483647)
StreamEnd ::= INTEGER(0)
END
Checking it with snacc I get the errors:
line 24: ERROR - value "numberColumns" is referenced but not defined or
imported.
line 30: ERROR - value "numberColumns" is referenced but not defined or
imported.
line 36: ERROR - value "numChars" is referenced but not defined or imported.
How do I reference
- numChars from line 36 to line 35
and
- numColumns from line 30 and line 24 to line 23
?
The other problem I have is the following:
even if I get numChars for the String referenced, to seperate the NULL value
from the empty String I increment numChars with 1 if it's not a NULL value.
How do I get _that_ in SIZE clause of data?
Greetings from Germany & winke: o/~
SvOlli
--
_______
( /\ |
__)v\/lli a.k.a. | Bring the beat back!
Sven Oliver Moll | -- The KLF, "Justified & Ancient"