[Antelope] trace table record length
Dr. Kent Lindquist
kent at lindquistconsulting.com
Tue May 5 16:23:29 CDT 2009
Hello Phil,
Are you using the same version of Antelope for both tests? I believe
the length of the Dbptr field type in the Trace4.0 schema changed from
16 to 32 characters between Antelope 4.9 and 4.10.
Best regards
Kent
% diff /opt/antelope/4.9/data/schemas/Trace4.0 /opt/antelope/4.10/data/
schemas/Trace4.0 | grep Dbptr
< Dbptr (16)
> Dbptr (32)
< Dbptr (16)
> Dbptr (32)
< Dbptr (16)
> Dbptr (32)
< Dbptr (16)
> Dbptr (32)
%
On May 5, 2009, at 10:36 PM, Phil Cummins wrote:
> Hi,
>
> When I use dbhelp to find out the length of records in a trace
> table, it says "408". but when I use the program below to get a
> record and print its length, the length is only 391. Can anyone tell
> me why that is? Is it just missing the last field, dbptr?
>
> - Phil
>
>
> % ./dbtst
> 0, record length = 391
>
> dbtst.c:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <math.h>
>
> #include "coords.h"
> #include "db.h"
> #include "stock.h"
> #include "tr.h"
>
> Dbptr trloadchan ( Dbptr, double, double, char *, char * );
>
> int main (int argc, char **argv)
> {
> int i;
> Dbptr db,tr;
> char rec[512];
>
> dbopen_database ( "smtra_2007", "r+", &db );
> tr = trloadchan(db,
> 1189595947.17310,1189599797.07310,"ADK","BHE_00");
> tr.record = 0;
> i = dbget(tr,rec);
> printf("%d, record length = %d\n",i,strlen(rec));
> exit(0);
> }
>
> _______________________________________________
> Antelope mailing list
> Antelope at brtt.net
> http://brtt.net/mailman/listinfo/antelope_brtt.net
--
Dr. Kent Lindquist kent at lindquistconsulting.com
Lindquist Consulting, Inc.
59 College Rd. Suite #7
Fairbanks, AK 99701 Phone/FAX 907-457-2374
http://www.lindquistconsulting.com
More information about the Antelope
mailing list