Sorry ignore my previous post. Having read your post more carefully I see that 
you probably want to know how to do specify the max length of the field. (As I 
said, I haven't used JDB before & assumed that c1 was more than just the field 
name).

Perhaps you checking out the demo databases that ship with the Addon will help.

   open 'data/jdb/sed'


> From: Sherlock, Ric
> 
> I've not used JDB before but it's not clear from your post what exactly
> you are trying to do.
...
>   b) or that the field will dynamically change its specification to now
> allow several characters
...
> If b), then I suspect that you will need to change the initial
> definition of the field to be the maximum number of characters that you
> want to be able to insert in it.
> 
> > From: christopher collins
> >
> > Does JDB have a way to declare the length of the char column?
> >
> > I've gone through the JDB doc and sample code carefully and can't
> find
> > any indication of how to declare the length of the char column.
> >
> > I've run a few experiments and can't get a JDB database table which
> > consists of only one char column to accept anything but a single
> > character in each insert.
> >
> > Here's the code:
> >
> > NB. Create a table with only a single char column
> > Create__db 'tblA';0 : 0
> > c1 char
> > )
> > NB. Insert a single character
> > Insert__db 'tblA';'a'
> > Insert__db 'tblA';'b'
> > Insert__db 'tblA';'c'
> > NB. works fine, no problem
> >
> > NB. Define another table with a single char column
> > Create__db 'tblB';0 : 0
> > c1 char
> > )
> > NB. Insert a string of characters
> > Insert__db 'tblB';'aaaaaaa'
> >
> > |assertion failure: validate
> > |   1=#~.(#@".)&>'active';Tcolmap
> >
> >
> > To summarize: I can't find any doc that outlines how to construct a
> > table with a single char column  that  accepts multiple characters.
> > Nor can I find any code samples. Various small experiments have
> failed.
> >
> > Thanks in advance for any help.
> > --chris--
> > ---------------------------------------------------------------------
> -
> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to