Converting text inserts to DBI calls
"Wechsler, Steven" <[email protected]> Tue, 29 Sep 2009 10:59:16 -0400
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase |
|---|---|
| Message-ID | <9BFA664319211B4780C5F8A4FB060FF5053AF5A4@LAZYTOWN.mtvn.ad.viacom.com> |
This is a multi-part message in MIME format. ------_=_NextPart_001_01CA4115.6A775F7C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm involved in a project where I need to replicate MySQL DML to Sybase 15. What's the easiest method I can use when inserting or updating text columns? Since placeholders aren't supported, it seems like I will need to parse the schema for each table, insert the non-text data and then do a ct_send_data() for each text column. I see that I can do direct inserts, but that can become a quoting nightmare if both single and double quotes appear in a single field. Suggestions are welcomed. Thanks, Steve ------_=_NextPart_001_01CA4115.6A775F7C Content-Type: text/html; charset="us-ascii" 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 = 6.5.7654.12"> <TITLE>Converting text inserts to DBI calls</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=3D2 FACE=3D"Arial">I'm involved in a project where I need = to replicate MySQL DML to Sybase 15.</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">What's the easiest method I can use = when inserting or updating text columns? Since placeholders aren't = supported, it seems like I will need to parse the schema for each table, = insert the non-text data and then do a ct_send_data() for each text = column. I see that I can do direct inserts, but that can become a = quoting nightmare if both single and double quotes appear in a single = field.</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial">Suggestions are welcomed.</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Steve</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01CA4115.6A775F7C--