I think I have a workaround. I have added the nvl function call into the select statement so that it returns a known value whenever it would return a NULL. Hopefully this will sort it out.
Still...
Type: Posts; User: clancyPC
I think I have a workaround. I have added the nvl function call into the select statement so that it returns a known value whenever it would return a NULL. Hopefully this will sort it out.
Still...
Hi,
I have a query that returns a value into a define variable, but if there is no value in the database for that field it inserts null. On Solaris this works fine, but I have migrated my code to...
Grumpy,
I see what you are doing, its effectively in decimal terms, reading the first three digits and then multiplying by 1000 before getting the next three digits. There is probably a more...
Hi,
I am converting data from an asn1 stream but my problem is with converting integer values. Asn1 works on a Tag, Length, Value (TLV) notation, so an integer can be stored in a variable length...
Its alright, my brain has woken up again, all done.
I thought there was an STL in C as well? If not then just replace STL with standard library of functions or whatever it is you want to call it; fred, george, betty its entirely up to you.
Hi,
Is there a STL function that lets me pass a full string, a substring to find and a substring to replace it with?
I will illustrate with an example:
I have a string like this:...
In this case it doesnt matter because each line is a single record, and no two lines are dependant on each other, so each line can be processed independently to any other. I wanted to check that...
If I were, in the main() function, to open a file, then kickoff a number of threads that would all access the file with each thread reading in a line each using fgets (which says that it is thread...
I have written a Pro*C program to do inserts into an Oracle database, but the data includes dates and times. The Pro*C manual is a bit sketchy on the subject of using dates on insert statements, so I...
Sorry that is what I meant by 'handles'. I assume that each terminating child process goes into a queue that is controlled by the OS, and wait takes the next one off the queue when it is called (if...
Thanks all.
In pseudocode I have:
for 0 to maxchildren
fork child
Do stuff
increment counter
followed by
I have a program that uses fork to generate a number of child processes. Without going into too much detail it generates 19 child processes that go off and do their thing and exit when they have...
Yes, compressed with the compress utility to produce a .Z file. Have not tried zlib, but I have had a look and there is a zlib.h in /usr/include. I will do a google search and see if I can turn up a...
Hi,
Does anyone know of a library on Solaris that has functions to allow you to read from a compressed file? I have a large number of compressed files that I need to process. I could write a...
Valenok,
Thanks for the reply. Basically you are saying I need to edit all my code to remove the backslashes, but the format can remain the same?
Oh bugger. Thats not a small job.
Thanks
Hi,
The company has just bought Sun Studion 10 for a new development environment, whereas before I was using Sun Workshop 3. Unfortunately there are differences in the way that the two compilers...
Cant do, there will be string fields in the stucture as well. Which I think answers my question in a slightly different way. Because unless I program in the loop which fields are strings and which...
Is it possible to increment through the fields of a structure using an index value.
If I had a structure like:
typedef struct {
int field1;
int field2;
int field3;
Thank you,
I did have a variation that had the string null terminated, but it did not make any difference. The output was the same for both cases.
The union does work, but I suppose what I was...
Can anyone explain why this is happening. First I will include the code that I am running.
#include <stdio.h>
int main(void)
{
char var1[4] = "FP10";
int var2 = 0;
I have a four byte binary field in a stream buffer that I wish to display in binary and decimal. Any suggestions? My mind has gone completely blank.
Thanks
I have a program that loads a very large avl tree and then opens a shared memory area and waits for requests (with semaphores to order the queueing). The client program connects to the shared memory...
For determining the failure reason and returning a more meaningful message to the log file. I havent come across strerror() before, but looking at the man page it looks like it will do what I want. ...
I was afraid that you were going to say that.
There must be some other return codes in errno.h that I can also use, I will just have to trawl through that.
Thanks