|Subject||RE: [firebird-support] Re: Problem in Bulk Insertion in Firebird|
> Dear Alan,you're in total control the dump file so don't put nulls in there. Left pad
> > I suppose you realise that external files need to be fixed field
> length char
> > files only?
> Yes i know that, i dumped my things into file like this:
> each line in my file consists of char[19+256]
> 19 for LONG value and 256 for CHAR(256)
> > You are talking about \0 (nulls) - I don't suppose you are imagining
> > any old file format is suitable to use as an external file?
> No, i havent used any old format of file.
> Those nulls were all due to this:
> Here is a snippit of my code.
> long value=10;
> string key="this is firebird forum";
> not to dump this in my file
> i did it like this:
> char totalArray = new char;
> value.ToString().ToCharArray().CopyTo(totalArray, 0);
> char word = p.changeToASCII(files[i]);
> word.CopyTo(totalArray, 10);
> so there will be null chars present in the unfilled section of char array.
> Like this i dumped in the file and then used as EXTERNAL FILE.
> Hey i even dont know if i'm doing it all right or not..
> Please do help me..
the numbers with spaces. Right pad the strings with spaces. Then FB will
read it all with no need for conversion.