I am trying to show a table structure on asp . I would like the field names and types and length and primary key and so on ....
I use ODBC for connect to sybase .
sql = " sp_help tablename "
I only can get this information for ODBC
tablname Name ,table Owner ,type
---------------------------------------
TableName ,user table ,dbo
(1 row affected)
But the sql statement " sp_help tablename " I use on isql
that can get all information which I want .
Includes field names and types and length and primary key and so on ....
how can I get what I want on asp which use ODBC connect to sybase ?
is there any parameter option after "sp_help" ?
like
sp_help tablename ,parameter1 ,parameter2 ??
Thanks in advance
sql = " sp_help AcntInfo " use on isql
********************************************************
Name Owner
Type
------------------------------ ------------------------------
----------------------
AcntInfo dbo
user table
(1 row affected)
Data_located_on_segment When_created
------------------------------ --------------------------
default Apr 18 2003 5:20PM
Column_name Type Length Prec
Scale Nulls Default_name
Rule_name Identity
------------------------------ ------------------------------ ------ ----
----- ----- ------------------------------
------------------------------ --------
AccCenter char 6 NULL
NULL 0 NULL
NULL 0
Currency char 3 NULL
NULL 0 NULL
NULL 0
.
.
.
.
AccName nvarchar 20 NULL
NULL 0 NULL
NULL 0
index_name index_description
index_keys
index_max_rows_per_page index_fillfactor
index_reservepagegap
-------------------- --------------------------------------------------------
-----------------------------------------------------------------------
----------------------- ---------------- --------------------
AcntInfo_PK clustered, unique located on default
AccCenter, Currency, AccTitle, AccSubTitle, Dtl
0 0 0
(1 row affected)
No defined keys for this object.
Object is not partitioned.
Lock scheme Allpages
The attribute 'exp_row_size' is not applicable to tables with allpages lock
scheme.
The attribute 'concurrency_opt_threshold' is not applicable to tables with
allpages lock scheme.
exp_row_size reservepagegap fillfactor max_rows_per_page identity_gap
------------ -------------- ---------- ----------------- ------------
0 0 0 0 0
(1 row affected)
concurrency_opt_threshold
-------------------------
0
(return status = 0)
********************************************************