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 Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler