Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: oracle Pro C question

RE: oracle Pro C question

From: Uma Sankara_Sivadanam <UmaSankara_Sivadanam_at_satyam.com>
Date: Mon, 4 Sep 2000 19:03:03 +0530
Message-Id: <10609.116150@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C01674.A8664450
Content-Type: text/plain

Hi,

I don't know much of pro*c .But if you are using a standard C function like strcpy() , it automatically adds a NULL char at the end. If this is not the case then use strcat() function. Hope this helps you.

Uma Sankar

> ----------
> From: 	John Dunn[SMTP:john.dunn_at_sefas.co.uk]
> Reply To: 	ORACLE-L_at_fatcity.com
> Sent: 	Monday, September 04, 2000 2:53 AM
> To: 	Multiple recipients of list ORACLE-L
> Subject: 	oracle Pro C question
> 
> 
> 
> > -----Original Message-----
> > From:	Jamie Pearce 
> > Sent:	01 September 2000 17:25
> > To:	John Dunn
> > Subject:	oracle question
> > 
> > Can you post this piss easy question to your Oracle group - I've wasted
> > too much time trying to do it.
> > 
> > I have an Oracle field on a table defined as VARCHAR2(200) and a C host
> > variable defined as char mystring[200].
> > 
> > How do I select the oracle field in to the C host variable so that a
> null
> > character automatically gets appended to the string?
> > e.g. if the Oracle field contained "hello" then the C host variable
> would
> > contain "hello\0" with no extra blanks?
> > 
> 
> 

------_=_NextPart_001_01C01674.A8664450
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: oracle Pro C question</TITLE>
</HEAD>
<BODY>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Hi,</FONT>
</P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">I don't know much of =
pro*c .But if you are using a standard C function like strcpy() , it = automatically adds a NULL char at the end.</FONT></P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">If this is not the =
case then use strcat() function.</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Hope this helps =
you.</FONT>
</P>
<BR>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Uma Sankar</FONT>
</P>
<BR>
<UL>
<P><FONT SIZE=3D1 FACE=3D"MS Sans Serif">----------</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">From:</FONT></B> &nbsp; =
<FONT SIZE=3D1 FACE=3D"MS Sans Serif">John =
Dunn[SMTP:john.dunn_at_sefas.co.uk]</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Reply To:</FONT></B> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D1 FACE=3D"MS Sans = Serif">ORACLE-L_at_fatcity.com</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Sent:</FONT></B> &nbsp; =
<FONT SIZE=3D1 FACE=3D"MS Sans Serif">Monday, September 04, 2000 2:53 =
AM</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">To:</FONT></B> =
&nbsp;&nbsp;&nbsp; <FONT SIZE=3D1 FACE=3D"MS Sans Serif">Multiple = recipients of list ORACLE-L</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Subject:</FONT></B> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D1 FACE=3D"MS Sans = Serif">oracle Pro C question</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; From: Jamie Pearce </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; Sent: 01 September 2000 =
17:25</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; To:&nbsp;&nbsp; John Dunn</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; =

Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oracle question</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; Can you post this piss easy =
question to your Oracle group - I've wasted</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; too much time trying to do =
it.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; I have an Oracle field on a =
table defined as VARCHAR2(200) and a C host</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; variable defined as char =
mystring[200].</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; How do I select the oracle field =
in to the C host variable so that a null</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; character automatically gets =
appended to the string?</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; e.g. if the Oracle field =
contained &quot;hello&quot; then the C host variable would</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&gt; contain &quot;hello\0&quot; with =
no extra blanks?</FONT> Received on Mon Sep 04 2000 - 08:33:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US