Re: VARCHAR and strcpy compiler warnings
From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1996/07/04
Message-ID: <4rgp0c$9vd_at_tpd.dsccc.com>#1/1
Date: 1996/07/04
Message-ID: <4rgp0c$9vd_at_tpd.dsccc.com>#1/1
sqlstmt.len = sprintf ((char *) sqlstmt.arr, "Select field from table");
You really need to set the .len to the length of the statement. the sprintf does the .arr and .len assignments in one line.
Bill Jones (wjones14_at_csc.com) wrote:
: Anyone know how to eliminate the compiler warnings you get when trying to
: compile a Pro*C program that have to do with VARCHAR declarations? Like
: in sample7.pc:
: strcpy(sqlstmt.arr,"SELECT field from table");
: --
: Bill Jones e-mail addresses:
: Computer Sciences Corp. (work) wjones14_at_csc.com
: Norwich, Connecticut (play) billj_at_mindport.net
: (203) 823-2168
-- This posting represents the personal opinions of the author. It is not the official opinion or policy of the author's employer. Warranty expired when you opened this article and I will not be responsible for its contents or use.Received on Thu Jul 04 1996 - 00:00:00 CEST