Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-17 Thread bill lam
ĵaŭ, 17 Dec 2009, christopher collins skribis: NB. The insert below causes a failure NB. After this the table can no longer be read. NB. QUESTION: Is that behavior intended? NB. If so, JDB seems a little fragile for the rough, unskilled hands of newbies like me NB. This insert, where '01' is

[Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-17 Thread christopher collins
Thank you, Mr. Lam and Mr. Rufon and all others for your assistance and instruction. --chris-- -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-17 Thread Alex Rufon
PM To: programming@jsoftware.com Subject: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure' Thank you, Mr. Lam and Mr. Rufon and all others for your assistance and instruction. --chris

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-16 Thread Devon McCormick
Hi - The following appears to work OK: Insert__db 'tblChar';,.'ABCDEF' The ,. preceding the vector turns it into a 1-column matrix, which is consistent with how the field is defined. Reads__db '* from tblChar' +--+ |c1| +--+ |a | |A | |B | |C | |D | |E | |F | +--+ Hope this helps. On Tue,

[Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-16 Thread christopher collins
Thanks to all for your help, especially Mr. Lam. Your response, Mr. Lam, was very instructive. I used your input to explore a bit more, with a couple of questions arising. See the questions embedded below: * load 'data/jdb' ffd =: Open_jdb_ jpath , '~temp'

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-15 Thread christopher collins
Thanks for the help, Mr. Tirrell. 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

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-15 Thread Sherlock, Ric
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

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-15 Thread Sherlock, Ric
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

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-15 Thread Alex Rufon
: programming-boun...@jsoftware.com [programming-boun...@jsoftware.com] On Behalf Of Sherlock, Ric [r.g.sherl...@massey.ac.nz] Sent: Wednesday, December 16, 2009 9:35 AM To: Programming forum Subject: Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives

[Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-15 Thread christopher collins
Thank you Ric, for your suggestions. I've reviewed the JDB doc carefully as well as all the example code and haven't found the solution to my trivial problem. Perhaps its there, but it is invisible to my J disabled cognition. In my original post on this issue (Sent: Sunday, December 13, 2009

Re: [Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-15 Thread bill lam
I don't use JDB either, however I guess you cannot declare a maximum length for the literal string in char column. you might have to reshape rank-1 vector before inserting. eg. ht=: Create__db 'tblChar2';'c1 char' Insert__db 'tblChar2';'a' Insert__db 'tblChar2';,'b' Insert__db

[Jprogramming] Newbie JDB problem: inserting chars in a 1 column char table gives 'assertion failure'

2009-12-13 Thread christopher collins
Hi, I'm just starting to learn J and JDB. I'm starting with the most trivial cases since they are best suited to my trivial IQ. I built a table with only 1 column defined as datatype char. I was successful in inserting a single character with each insert statement. However, when I tried