Distributing db "events" over network and NULL fields
Posted in 1996
Hi, I am using the "system" SPL command to distribute insert, update and delete messages for particular tables over our network. The problem that I'm runing into is that the system command can't handle NULL values. For example: system '/a/b/c/some_prog column1 ' || column1 If column1's value is null, the transaction will fail. So I added define my_column1 int; (assuming that column1 is an int) if column1 is null then let my_column1 = -1; (or some value that signals null) else let my_column1 = column1; end if then ran: system '/a/b/c/some_prog column1 ' || my_column1 For tables with a couple of columns this isn't a big deal. For tables with 50 or more columns I worry about a performance hit with the if; then; else construct. Is there a simpler way? I know, use CORBA or something and let it worry about it for me. But without that is there some other way to distrubute these changes? The above works and I can get database events over our net. I just am concerned about efficency. Thanks for any information you might have. -- scott dunbar g-bar limited partnership dunbar@hotjoe.com (home) chicago, il, usa scott@gbar.com (work) 312 362 4479