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: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: how do i retrieve column defaults?
Date: Dec 2 1997 1:17AM

Matt Silvia wrote:
> 
> Hi everyone,
> 
> I'm sorry if this is a newbie question, but I've been using sybperl for only a few weeks.
> 
> does anyone know the best way to retrieve column defaults?  i tried passing a "sp_help " string to my query handler (which uses ct_execute and ct_results), but I got an error message that says:
> 
> ct_results(): user api layer: external error: This routine cannot be called when the command structure is idle.
> 
> am i going about this the wrong way?

You can get the defaults from the system tables. I don't
remember off-hand the exact location (I believe it's in
sysobjects), but code to retrieve them exists in dbschema.pl,
which can be found in the eg/ directory of the sybperl distribution.

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler