how to convert a existing database

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jul 2 09:33:13 CDT 2005


On 7/2/05 2:38 AM, "Damon Pillinger" <daisychain at iinet.net.au> wrote:

Hi Damon,

> HI all,
> Simple question.
> RB 5.5.5  Val.fc12
> 
> I have a database with a table called FileDataBase and a table called
> map, one of the fields is called ali
> 
> In the existing database the data is
> ALI+++X7+164'
> 
> It is the ' which is the problem
> 
> 
> INSERT INTO map
> (ali,bgm,bsn,cnt1,cnt2,cps,cps1,dtm,loc,name,pac,pac1,qty,rff,uci,unb)
> VALUES
> ('ALI+++X7+164'','BGM+YA5::9+~1~+9'','BSN*00*~1~*~2~*~3~*001','CNT+1:~1~
> '','CNT+2:~1~'','CPS+~1~+~2~+1'','CPS+1++5'','DTM+137:~1~~2~:203'','LOC+
> 8+~1~::92'','Myer Grace
> Bros','PAC+~1~++CT'','PAC+1++CT'','QTY+12:~1~:KGM'','RFF+CN:~1~'','UCI+~
> 1~+~2~:ZZ+~3~:ZZ+7'','UNB+UNOA:3+~1~:ZZ+~2~:ZZ+~3~:~4~+~5~++++1++~6~'')

Where from comes this SQL command?

A) from e.g mySQL dump ?

B) you build it self by concatenation of strings ?

 
> The above obviously does not work. I have tried
> valentina.escapestring(AllTheAbove,false)

As far as I see, if give to valentina.escapestring() the above command, then
we will get back:

    VALUE( \'ALI+++X7+164\'\',

But we must get 

    VALUE( 'ALI+++X7+164\'',

You see?

So if you build string self, then you need call Valentina.EscapeString()
For EACH value you add. And wrap escaped string by single quotes self.
I think you can make simple helper function to do that
 

> But this then save ALI+++X7+164\'
> 
> Please tell me what to do.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list