I've not used JDB before but it's not clear from your post what exactly you are trying to do. You have declared a table consisting of one field that is a single character in length. Then you try to insert a record into the table that is multiple characters in length. Are you expecting a) the multiple characters to be recognized as multiple records b) or that the field will dynamically change its specification to now allow several characters
If a), then try: Insert__db 'tblB';,.'aaaaaaa' 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