Re: How to Map this Pro*C Code to Sybase?

From: Brian L. Jeffries <brianj_at_aw.com>
Date: Wed, 6 Apr 1994 14:21:44 GMT
Message-ID: <CnuD89.3Ms_at_aw.com>


In article <1994Apr5.204001.26437_at_cc.gatech.edu>, badri_at_cc.gatech.edu (badri) says:
><edited for brevity>
> I have the following question:
>
> In Pro*C, we say
>
> >VARCHAR aWord[4];
> >strcpy (aWord.arr, someWord);
> >aWord.len = strlen (someWord.arr);
>
> How do I map these into C code for compiling and
>running under Sybase?
>
I don't know Pro*C, but following should work:         

	DBVARYCHAR aWord;
        char      *someWord;

	strcpy ((char *)aWord.str, someWord);
	aWord.len = strlen (someWord);

See also "types" in the DB-Library reference manual &/or sqlfront.h. -Brian. Received on Wed Apr 06 1994 - 16:21:44 CEST

Original text of this message