Tech Rocks

Coldfusion
Java
JQuery

An online resource for latest web technologies like Coldfusion, JRun, Pro*C, JQuery, HTML5, PHP, W3C, Java, J2EE, C, C++, ORACLE, PL/SQL, MySql, Ajax, Coldbox, Fusebox, UNIX, JavaScript, NodeJS and much more...

Sunday, February 8, 2009

VARCHAR Usage in Pro*C

VARCHAR Index[UNAME_LEN];
VARCHAR Path[PATH_LEN];
VARCHAR Name[NAME_LEN];

strncpy((char *) Index.arr, Index, INDEX_LEN);
Index.len = (unsigned short) strlen((char *)Index.arr);

strncpy((char *) Path.arr, pPath, PATH_LEN);
Path.len = (unsigned short) strlen((char *) Path.arr);

strncpy((char *) Name.arr, pName, NAME_LEN);
Name.len = (unsigned short) strlen((char *) Name.arr);

EXEC SQL INSERT INTO TABLE (Index,File,Name)
VALUES(:Index, :File, :Name);

0 comments :

Post a Comment