Re: Inserting records using Informix ODBC
Posted in 2004
--0__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602
Content-type: multipart/alternative;
Boundary="1__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602"
--1__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602
Content-type: text/plain; charset=US-ASCII
Hi,
What version of CSDK/ODBC are you using? What's the error message? What's
the coulmn type in which you are trying to insert the same?
I tried the CSDK 2.81.XC3/ ODBC 3.82.XC3 with IDS 9.40 and everything seems
to be working correctly. Though I haven't tried with SE server and
I don't think that would be the problem. I am using C application and
calling the SQLExecDirect API as follows :
Schema : create table new_tab(char_col char(30), text_col text);
SQLExecDirect( hstmt, "insert into new_tab values(\\"This code's all
wrong\\", \\"This code's all wrong\\");", SQL_NTS );
after running my app, if I go back and run the select query in dbaccess it
gives me the correct result as follows :
select * from new_table;
char_col This code's all wrong
text_col
This code's all wrong
HTH
Thanks & Regards
-Shesh
"me"
<mark@cuskit.co.u To: informix-list@iiug.org
k> cc:
Sent by: Subject: Inserting records using Informix ODBC
owner-informix-li
st@iiug.org
03/04/2004 05:19
AM
Please respond to
"me"
Hi all,
We are currently converting the old 4GL system using VB, connecting to
Informix SE using Informix ODBC.
Everything works fine apart from inserting/updating records that have
single
quotes in them
eg insert into table....blahh blahh "This code's all wrong" etc etc
The old Informix system seems to handle single quotes in strings just fine
but the ODBC drivers don't like them.
I can obviously search for the erroneous quote and replace it with
something
else and then do the reverse when i read it back, however that would mean
going through all the old Informix code and doing the same thing, something
I don't really want to do!
Anyone got any ideas, its obviously something to do with the ODBC but can't
see anything obvious in the settings etc
Thanks in advance
Mark Jerrom
--1__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline
<html><body>
<p>Hi,<br>
<br>
What version of CSDK/ODBC are you using? What's the error message? What's the coulmn type in which you are trying to insert the same?<br>
<br>
I tried the CSDK 2.81.XC3/ ODBC 3.82.XC3 with IDS 9.40 and everything seems to be working correctly. Though I haven't tried with SE server and<br>
I don't think that would be the problem. I am using C application and calling the SQLExecDirect API as follows :<br>
<br>
Schema : create table new_tab(char_col char(30), text_col text);<br>
<br>
SQLExecDirect( hstmt, "insert into new_tab values(\\"This code's all wrong\\", \\"This code's all wrong\\");", SQL_NTS );<br>
<br>
after running my app, if I go back and run the select query in dbaccess it gives me the correct result as follows :<br>
<br>
select * from new_table;<br><br>
char_col This code's all wrong<br>
text_col<br>
This code's all wrong<br>
<br>
HTH<br>
<br>
Thanks & Regards<br>
-Shesh<br>
<br>
<img src="cid:10__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com" width="16" height="16" alt="Inactive hide details for "me" <mark@cuskit.co.uk>">"me" <mark@cuskit.co.uk><br>
<br>
<br>
<table V5DOTBL=true width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img src="cid:20__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com" border="0" height="1" width="72" alt=""><br>
</td><td style="background-image:url(cid:30__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " width="1%"><img src="cid:20__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com" border="0" height="1" width="225" alt=""><br>
<ul>
<ul>
<ul>
<ul><b><font size="2">"me" <mark@cuskit.co.uk></font></b><br>
<font size="2">Sent by: owner-informix-list@iiug.org</font>
<p><font size="2">03/04/2004 05:19 AM</font><br>
<font size="2">Please respond to "me"</font></ul>
</ul>
</ul>
</ul>
</td><td width="100%"><img src="cid:20__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com" border="0" height="1" width="1" alt=""><br>
<font size="1" face="Arial"> </font><br>
<font size="2"> To: </font><font size="2">informix-list@iiug.org</font><br>
<font size="2"> cc: </font><br>
<font size="2"> Subject: </font><font size="2">Inserting records using Informix ODBC</font></td></tr>
</table>
<br>
<br>
<font face="Courier New">Hi all,<br>
<br>
We are currently converting the old 4GL system using VB, connecting to<br>
Informix SE using Informix ODBC.<br>
<br>
Everything works fine apart from inserting/updating records that have single<br>
quotes in them<br>
<br>
eg insert into table....blahh blahh "This code's all wrong" etc etc<br>
<br>
The old Informix system seems to handle single quotes in strings just fine<br>
but the ODBC drivers don't like them.<br>
<br>
I can obviously search for the erroneous quote and replace it with something<br>
else and then do the reverse when i read it back, however that would mean<br>
going through all the old Informix code and doing the same thing, something<br>
I don't really want to do!<br>
<br>
Anyone got any ideas, its obviously something to do with the ODBC but can't<br>
see anything obvious in the settings etc<br>
<br>
Thanks in advance<br>
<br>
Mark Jerrom<br>
<br>
<br>
</font>
</body></html>
--1__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602--
--0__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602
Content-type: image/gif;
name="graycol.gif"
Content-Disposition: inline; filename="graycol.gif"
Content-ID: <10__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com>
Content-transfer-encoding: base64
R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu
ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7
--0__=08BBE4DEDFF136028f9e8a93df938690918c08BBE4DEDFF13602
Content-type: image/gif;
name="ecblank.gif"
Content-Disposition: inline; filename="ecblank.gif"
Content-ID: <20__=08BBE4DEDFF136028f9e8a93df938@us.ibm.com>
Content-transfer-encoding: base64
R0lGODlhEAABAIA