I have a short program that requires storing of Ascii strings that
happen to be numbers. It seem that when I retrieve the data it has been
interrupted as a numeric value and is returned altered. I.E. "0E00" is
returned as "0", "0000" is returned as "0",  "76E0" is returned as "76"

 

Thanks for any help in advance.

 

   SQL_Write( db, "CREATE TABLE P ( ENCODING INTEGER PRIMARY KEY UNIQUE,
ST STRING, EN STRING, SW STRING,DW STRING,BX STRING);" );

 

sprintf(sql_statment,"INSERT INTO P VALUES(
%d,\'%s\',\'%s\',\'%s\',\'%s\',\'%s\');", evalue, pt[0], pt[1], pt[2],
pt[3], pt[4]);

 

Example: INSERT INTO P VALUES(
21,'0E00','0000','7E00','1234','NOVALUE');

 

Returned:   21, '0','0','7','1234','NOVALUE'

 

Michael Flum

Software Engineer

Haas Automation, Inc.

 

Reply via email to