Re: VARCHAR and strcpy compiler warnings
Date: 1996/07/05
Message-ID: <4rhsma$99e_at_ramona.sfo.com>#1/1
: 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:
: VARCHAR sqlstmt[400];
: strcpy(sqlstmt.arr,"SELECT field from table");
Use datatype equivalencing :)
DE gives you the ability to declare host variables and then indicate to Pro*C their type (ie STRING). This is prety handy for strings as it means less hassle - the variables are then just like normal 'C' strings, no .arr and .len to deal with and they are null terminated when read from the db.
I haven't used VARCHARs in new Pro*C code for many a year. Maintenance on the other hand ....
If you require help other than the above it would be useful to know your environment - machine, compler and compiler switches.
IAP Received on Fri Jul 05 1996 - 00:00:00 CEST