PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Tim_Green at mercer dot com
Subject: Re: help with inserting text
Date: Feb 18 1998 2:28PM

     If your text strings aren't a great deal longer than you have here, 
     then using dbwritetext is overkill and probably slower.  It's 
     definitely more complicated.  That particular function is meant for 
     dealing with large text strings.  
     
     For data of the variety you have here, simply use a basic insert 
     statement, which can populate text datatype columns just like any 
     other, and can handle data up to approx. 128k.
     
     Good luck,
     
     Tim Green                                        Tim_Green@mercer.com
     Administrative Solutions Group
     "An ADP/Mercer Alliance"


______________________________ Reply Separator _________________________________
Subject: help with inserting text
Author:  SYBPERL-L@trln.lib.unc.edu at uucp
Date:    2/17/98 6:44 PM


Hello:
     
I am a bit confused on how one inserts text into Sybase using DBlib. I have 
data that I am trying to load into my database that looks like:
     
µ-ziq|24|129|http://www.caroline.com/astralwerks/muziq/|"America's premiere
 electronic label, Astralwerks Records, presents the µ-ziq"|astralwerks@car
oline.com|Astralwerks
     
I am taking this data from a text file, spliting it apart (pipe delimited, "|") 
into variables and attempting to insert it into my database.  All my columns 
are text datatypes except for two, integers, which in the above example, would 
be "24" and "129".
     
I believe I am to use dbwritetext, but I do not understand it properly. The 
examples in the man pages are confusing to me, e.g., how does one determine 
the column number.
     
If anyone could explain how to accomplish this, it would be greatly 
appreciated.
     
Regards,
     
     
Philip
philipm@nafohq.hp.com