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: =?iso-8859-1?Q?Pochet_Fr=E9d=E9ric?= <Frederic dot Pochet at cockerill-sambre dot com>
Subject: RE: very basic db connection question
Date: Feb 10 1999 4:06PM

ct_sql returns an array (or adress of, ...) in one shoot.
ct_execute returns one row each time you call ct_result (watch out,
sometimes you will receive extra info like CMD_DONE, ... see your OC
reference manual).

best regards

fpo


==========================================
Frederic Pochet
DBA DB Distribuees

Cockerill Sambre

*
Rue Vieille Fosse
B-4400 Flemalle
Belgium

*  +32 4 236 20 71
*   +32 4 236 21 00
*  frederic.pochet@cockerill-sambre.com
==========================================

> ----------
> From: 	Sheree Hemphill[SMTP:sah18@po.cwru.edu]
> Reply To: 	SYBPERL-L@listproc.net
> Sent: 	mercredi 10 février 1999 14:11
> To: 	SybPerl Discussion List
> Subject: 	RE: very basic db connection question
> 
> this worked just fine for me!
> 
> one more question on this:
> i'm not quite clear as to the difference between ct_sql and ct_execute.
> when would you use one over the other (ie, why couldn't the "use database"
> command be passed via ct_execute instead)?
> thank you once again,
> sheree
> 
> 
> > -----Original Message-----
> > From: owner-SYBPERL-L@listproc.net
> > [mailto:owner-SYBPERL-L@listproc.net]On Behalf Of Michael Peppler
> > Sent: Tuesday, February 09, 1999 4:48 PM
> > To: SybPerl Discussion List
> > Subject: very basic db connection question
> >
> >
> > >>>>> "Sheree" == Sheree Hemphill  writes:
> >
> > Sheree> Hello.  I am new to Sybperl, and I would like to use CTlib to
> > Sheree> connect to a database.  I can only seem to find code examples
> > Sheree> which connect to the Master database, but none which show how
> > Sheree> to connect to a user-defined database.  Can someone give me an
> > Sheree> example of the syntax for this?
> >
> > $dbh->ct_sql("use $database");
> >
> > Michael
> > --
> > Michael Peppler         -||-  Data Migrations Inc.
> > mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
> > Int. Sybase User Group  -||-  http://www.isug.com
> > Sybase on Linux mailing list: ase-linux-list@isug.com
> >
> >
>