How Can I Get The SQL Server 2000 Column Description

Feb 9, 2007

How can I get the SQL Server 2000 Column Description within ADO.NET 2.0?

BR / Chris

View 3 Replies


ADVERTISEMENT

Retrieving The Error Description In SQL SERVER 2000

Feb 25, 2008

Hello All,

I am stuck at a place in SQL SERVER 2000.

I have created stored procedures and I am checking whether any error has occured on execution of the statements in that procedure.

If the @@Error <>0 then I need to log this error into my error logging table.
For this, I need to retrieve the error description given by SQL SERVER 2000.

I tried this using the master.dbo.sysmessages table. But I get a text from master.dbo.sysmessages which has the placeholders like %l, %s, etc.


I dont want this type of error. I want the exact error description which has the actual objects names and not the placeholders.

I found some help at this link : http://www.sommarskog.se/error-handling-I.html#textretrieve

But i want to know whether there is any other way of doing this or not.

Thanks,
Kapadia Shalin P.

View 3 Replies View Related

Retrieval Of The Description Of A Field In A SQL Server 2000 Based Table

Jun 1, 2006

I live in Brazil, and use SQL Server 2000 SP4 with Visual Basic 5.0 SP3, with connectivity to ODBC through RDO/ADO.

I have an example table with the following structure:

Table Name: Autioneer's (translated from Portuguese)

'Field 1/3
Name: Code
DataType: int
Description: Auctioneer's Code

'Field 2/3
Name: Name
DataType: nvarchar(50)
Description: Auctioneer's Name

'Field 3/3
Name: RegNum
DataType: nvarchar(20)
Description: Auctioneer's Registration Number

I need a way to programatically extract the Fields Description Property from the table

example sintaxe:

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='AUCTIONEERS'

Thanks for any help that can be offered here
Neil Ramkeerat.

Replies can be sent to neilramkeerat@hotmail.com

View 3 Replies View Related

Column Description

May 18, 2005

Hello, it seems I forgot how to do it,
I want to create a query to get the column description table, I mean get structure without data.
I remember it was select DESC or something like that, donno if im right!!!
 
regards

View 6 Replies View Related

Description Column In SP

Dec 17, 2013

I am having trouble bringing "description" column in to my sp and them at the out put. in the ppatient_status_mstr there is a column called“description” which has patient status such as “discharged” “termed collection” etc... How do I use the SP to bring this description into application? I am assigning it to @mytext. I am not sure how to declare “description” in the SP? Every time I use it I get errors like:

Msg 4104, Level 16, State 1, Procedure CheckStatus, Line 20
The multi-part identifier "pm.alerts_ind" could not be bound.
Msg 207, Level 16, State 1, Procedure CheckStatus, Line 40
Invalid column name 'description'.
Msg 207, Level 16, State 1, Procedure CheckStatus, Line 43
Invalid column name 'description'.

I want to say if user picks a description from application . show me that description in output. But I am having trouble how to use the description? I am not sure if my “IF” statements are correct either?

Here is the procedure

ALTER PROCEDURE [dbo].[CheckStatus] (@enc_id varchar(36) OUTPUT, @Mytext varchar(50) OUTPUT, @data_ind Char(1) OUTPUT)
AS
BEGIN
DECLARE
@alerts_ind char(1)

[code]....

View 20 Replies View Related

Get The Description Of A Column

Jul 23, 2005

Okay guys heres the senario.I have written a kick butt asp application that allows me to test sqlstatements and manage/display all my databases from the web but I havea feature I want to include that I can't figure out how. In EnterpriseManager, one of the column editable properties is the ColumnDescription. I can't find it in sql server itself. only in theEnterprise Manager. I need to access it using a sql statement so thatit will display in my table definiation view that I create in the aspapp.

View 1 Replies View Related

Description Properties In SQL 2000

Jul 15, 2001

A query to get the Table and Column Description fields in SQL Server 2000.


SELECT so.name, sc.name, sc.xtype, sc.length, sc.colid,
tableprop.value as TableDescription,
colprop.value as ColDescription

FROM

sysobjects so

INNER JOIN syscolumns sc ON sc.id = so.id
INNER JOIN sysproperties tableprop ON tableprop.id = so.id and tableprop.type = 3
INNER JOIN sysproperties colprop ON colprop.id = sc.id and colprop.type = 4
and colprop.smallid = sc.colid

WHERE so.type='u' and so.name = 'TableName'

Order by sc.ColID





Damian

View 2 Replies View Related

SQL Server2000 And COLUMN DESCRIPTION

Nov 16, 2001

HI

I have a big problem with SQL server2000. I can't get COLUMN DESCRIPTION.
I will print DATADICTIONARY from a DB, I can get all elemnts (table name, columns name, datatype, precision, scale, FK, PK, default value..) I missed only DESCRIPTION. How I can get it????

Medo

View 1 Replies View Related

List Column Name And Description

May 26, 2006

Hello everybody,

If I know the table name, is there any command to list all "Column Name" and the Columns "Description" as shown in the Design Table window.

Any feedback is welcome!

Thank you,

Edi

View 3 Replies View Related

Get And Set Column Description From Sql Server2005

Aug 10, 2007

I dont know,how can I get column description from Sql Server 2005 and use it in vb.net 2005? would you please help me solve it?

View 1 Replies View Related

Set COLUMN Description In .Net 2005,

Aug 13, 2007

Hi,
I want to set column description in .Net 2005, Please guide me.
thanx very much

View 1 Replies View Related

How To Get Column Description From MetaData?

Mar 25, 2008



I've tried looking in sys.syscolums and sys.syscomments, but I can't seem to find where the Description information is retain for a Field in the system tables -- any hints?

Thanks, Rob.

View 2 Replies View Related

Display Column Description

Jun 13, 2006

I have this easy sql for a drop down.

select code_value, desc1
from dbo.market_area_code
where code_value in ('1', '2', '4')

How can I add something to display something like

if code_value = '1' then display 'Blue'
if code_value = '2' then display 'Orange'
if code_value = '4' then display 'Red'

View 3 Replies View Related

How Can I Retrieve Description And Other Column Information?

Jun 2, 2004

Hi, all..
I want to know the query to retrieve Column information that we can see from table Design view of Enterprise manager, such as Column name, Pk or not, FK table, Data Type, Null or not, Description(Specially Descrition).

Is there any sp for this or any query for this?

Thank you all...

View 14 Replies View Related

Get Column Or Table Description Query

Jun 12, 2008

How can I query/script Column or Table description (extended property MS_Description') in SQLserver 2005 db.

View 4 Replies View Related

Selecting The Column Description In 2005

Aug 3, 2006

I am migrating between SQL Server 2000 and SQL Server 2005 but hit a snag when attempting to write a query to display the column's description.

I used this code with SQL Server 2000 to get the "Description" data.

select o.name 'table' , c.name 'column' , p.value as 'description' , t.name 'datatype' , c.isnullable 'nullable?' , c.length, m.text 'default_text' from sysobjects o

join syscolumns c on o.id = c.id

join sysproperties p on o.id = p.id and p.smallid = c.colid

join systypes t on c.xtype = t.xtype

left outer join syscomments m on m.id = c.cdefault

order by 'table' , 'column'

How can I reproduce this with SQL Server 2005? I tried using the following which gives me a lot of the same data but not "Description":

SELECT * FROM INFORMATION_SCHEMA.COLUMNS

Any help here would be greatly appreciated.

View 3 Replies View Related

How To Display The Column Description In Query Analyser

Jun 1, 2004

Hello All.

I have created a table with short name as the file name but have entered the description in the column box (when creating a new table - see attached). I would like to show this description information in query analyser. Can this be done? I used sp_help <table name> but it doesn't show the description.

Please advise. Thank you.


Best regards

View 2 Replies View Related

GetSchema Not Returning Description Of Table Or Column

May 1, 2008

I am trying to get the schema of database using the getschema method. However, the schema that is being returned does not include the description. I have added in table and column descriptions for some of my tables and columns but the dataset returned does not include the description column.

Any idea on how to get the description to be output?


Dim testCn As System.Data.OleDb.OleDbConnection

testCn = New System.Data.OleDb.OleDbConnection(step2.GetRevEngConn.ConnectionString)

Dim testDS As DataTable

testCn.Open()

testDS = testCn.GetSchema("TABLES")
testds.writexml("c:schematables.xml")

testDS = testCn.GetSchema("COLUMNS")
testDS.writexml("C:schemacol.xml")

testCn.Close()



- <Columns>


<TABLE_CATALOG>XDMDB_LAPTOP</TABLE_CATALOG>

<TABLE_SCHEMA>dbo</TABLE_SCHEMA>

<TABLE_NAME>PropertyValue</TABLE_NAME>

<COLUMN_NAME>property_value</COLUMN_NAME>

<ORDINAL_POSITION>6</ORDINAL_POSITION>

<COLUMN_HASDEFAULT>false</COLUMN_HASDEFAULT>

<COLUMN_FLAGS>230</COLUMN_FLAGS>

<IS_NULLABLE>true</IS_NULLABLE>

<DATA_TYPE>130</DATA_TYPE>

<CHARACTER_MAXIMUM_LENGTH>0</CHARACTER_MAXIMUM_LENGTH>

<CHARACTER_OCTET_LENGTH>0</CHARACTER_OCTET_LENGTH>

<CHARACTER_SET_CATALOG>master</CHARACTER_SET_CATALOG>

<CHARACTER_SET_SCHEMA>dbo</CHARACTER_SET_SCHEMA>

<CHARACTER_SET_NAME>iso_1</CHARACTER_SET_NAME>

<COLLATION_CATALOG>master</COLLATION_CATALOG>

<COLLATION_SCHEMA>dbo</COLLATION_SCHEMA>

<COLLATION_NAME>SQL_Latin1_General_CP1_CI_AS</COLLATION_NAME>

<COLUMN_LCID>1033</COLUMN_LCID>

<COLUMN_COMPFLAGS>196609</COLUMN_COMPFLAGS>

<COLUMN_SORTID>52</COLUMN_SORTID>

<COLUMN_TDSCOLLATION>CQTQADQ=</COLUMN_TDSCOLLATION>

<IS_COMPUTED>false</IS_COMPUTED>
</Columns>

View 2 Replies View Related

Setting The Column Property Description With A SQL Function Call

Feb 2, 2008

I am trying to figure out how to set the Description of a Column in my database table by making a SQL function call. I know that I can go into Microsoft Studio Express and type in each desciption for each column. I just have about 1000 variables and each variable's description is in an Excel spreadsheet. I want to be able to build SQL code that will set each of the 1000 variables own description.

Thanks for any help.

Wesley Marshall

View 4 Replies View Related

Reading Values From Data-description Column And Insert Into One Table?

Jul 17, 2013

I have a subselect that should be working but doesn't. Been at it too long today.

DECLARE @Calendar1 AS DateTime
SET @Calendar1 = '{{{ Please choose a start date. }}}'
SELECT
('0' + CONVERT (varchar (10), W.WorkerID)) AS VendorID,
(W.FirstName + ' ' + W.LastName) AS VendorName,
(W.FirstName + ' ' + W.LastName) AS Contact,

[code].....

Where did I go wrong?

View 3 Replies View Related

Using @column = [column] SQL Server 2000

Nov 20, 2007

Should the following select statement return ALL the records including the records where [district] is null?  Currently it is only returning non null records.  I tried it with a default value and without with the same results.
SelectCommand="SELECT [ID], [last], [first], [district], [TA] FROM [regd] Where ([district] Like case when @district is null then [district] else @district end)"
<SelectParameters ><asp:ControlParameter ControlID="Last_textbox" Name="district" defaultvalue="%" PropertyName="Text" Type="String" /></SelectParameters>

View 3 Replies View Related

SQL Server 2000: Add Column Before Other Column

Feb 27, 2006

How do I add a column in SQL Server table in between two other columns?

View 8 Replies View Related

Get Field Description From SQL Server 2005

Jan 12, 2007

 
I have SQL Server 2005 Epress and I want to get the field's dscription..
 
 

View 1 Replies View Related

Column Encryption In Sql Server 2000

Jun 23, 2004

Are there any UDf's or Xtended stored procs available in sql server 2k that can encrypt a column that has the CC #'s or do I need to purchase a 3rd party tool ?

thanks,
Dinakar

View 3 Replies View Related

Where Is Stored Columns Description For SQL Server Tables?

Jul 20, 2005

I am a beginer in SQL Server and if someone knows I would like to knowwhere are stored columns description - am refering at that columndescription that can be write for each column when you create a tablein a SQL Server Database using SQL Server Enterprise Manager.I want to get this information from the database and display it in aC# application, I 've tryed COLUMNPROPERTY function and sp_columnsprocedure, but this are not giving me the column definition, onlytype, name, etcThanksMaria

View 4 Replies View Related

Can't Save Package To Server (No Description Found)

Nov 8, 2005

I'm getting an error, "No description found", when trying to save my package to the SQL Server (2005).

View 4 Replies View Related

Save To Sql Server Failed No Description Found

Nov 9, 2006

I want transfer data from excel file to sql server.

I created a package in sql server managament studio using export import wizard and i gave the option "sql server" as the package location.

At the final stage of the wizard "Save to sql server failed no description found" error is coming. pls give me a solution.

thank u

View 7 Replies View Related

Problems With Text Column In SQL SERVER 2000

Aug 4, 2005

Hi,I am trying to access the data inside a text column in the database and display it on a page.The problem is, I cannot see the full data when I execute the stored procedure in SQL Server and also on the asp.net page.it seems Sql server clips the data if it is more than 3000 characters. Is there anyway I can see the whole data that is stored in that particular column.I do not understand why asp.net is also clipping the data. What container can I use to display the text? I have tried Literal, string, placeholder but nothing shows the full text that is supposed to be in the database.I have seen some people using byte arrays but I am not sure how I can use them to display data on a page. If anyone has done this before or had a similar problem please reply back.Thanks.

View 7 Replies View Related

Exclude Column For Replication In SQL Server 2000

Mar 3, 2008

Hi. I'm creating a new publication for replication. There are a few columns on our main database I do not want published as they contain some confidential information. When I go to create a new publication, I go through the wizard and I select the option to filter rows vertically. I uncheck the columns I don't want published and the wizard completes without any errors.

When I go to start the Snapshot agent to create the database on new server, it gets error saying it cannot find certain columns--the columns I do not want published to begin with.

Am i doing something wrong? I appreciate any help you may provide!

View 7 Replies View Related

Transpose Row Values As Column In MS Sql Server 2000

Apr 23, 2008



How can i transpose rows value as Column?

Table A





TypeID

Payment Type


1

CASH


2

EFPOS


3

BANK CARD


4

VISA


5

AMEX


6

DINNER

NOTE: User can add some more Payment type

Required Output




CASH

EFPOS

BANK CARD

VISA

AMEX

DINNER













































































































Thanks
DA

View 5 Replies View Related

Column Limit In Sql Server 2000 Replication?

Apr 4, 2007

I am being told that the colid in syscolumns may not exceed 255 if the table is replicated. Is that true? Where in BOL or elsewhere can I read-up on this? This is a shocking development!!!

View 3 Replies View Related

Can't Save Package To Server (No Description Found) ERROR - Again

Dec 31, 2005

Hello, I need some help with installing release copies of SQL05(+SSIS) and VS05 on Win03R2.  It is very frustrating when a basic install fails. Ive been going round and round with this.  M$ support has not been of help yet.


I have a new development box for SQL05/VS05 development, and when I do a clean install of release software from MSDN: Windows Server 2003 R2 ent; SQL Server 2005 dev; Visual Studio 2005 pro I find that the "save to server" in SSIS (and other utilities that save a package) fails with a non-informative message *No Description Found* (see error text below).


To setup this box I install Win03R2 first, promote it to a Active Directory DC (the one and only DC in a test forest), then install VS05 onto the E: drive.  Note, I must install VS05 first (before SQL05) so that all components get installed to the RAID5 *E:* drive.  If SQL05 is installed first then VS that comes with SQL gets installed on to C: (no way I see to get around this) then the full VS05 pro gets forced to install on the C: drive.


Then I install SQL05 (with everything including SSIS).  At this point every thing works fine, packages can be saved ok.


If I then install VS05 again so that all settings of VS05 are as expected of a standard VS05 install (not the SQL version) then the problem with saving packages arises.


If the error message was a little more informative, I might be able to track down the source of the problem.  Please help!  I have tried a bunch of things - creating credentials, proxies, using the most privileged accounts possible, etc.


Thanks, MikeC

 

Error from create SSIS package (save to server):
===================================

No description found (Microsoft Visual Studio)
------------------------------
Program Location: at Microsoft.SqlServer.Dts.Runtime.Application.SaveToSqlServerAs(Package package, IDTSEvents events, String packagePath, String serverName, String serverUserName, String serverPassword) at Microsoft.DataTransformationServices.Controls.PackageLocationControl.SavePackage(Package package) at Microsoft.DataTransformationServices.Design.Controls.PackageSaveCopyForm.PackageSaveCopyForm_FormClosing(Object sender, FormClosingEventArgs e)

===================================


Error from copy db wizard:
===================================

No description found (Copy Database Wizard)
------------------------------
Program Location: at Microsoft.SqlServer.Dts.Runtime.Application.SaveToSqlServerAs(Package package, IDTSEvents events, String packagePath, String serverName, String
serverUserName, String serverPassword) at Microsoft.SqlServer.Management.CopyDatabaseWizard.PackageCreator.SavePackage()

===================================

View 3 Replies View Related

Querying A TEXT Datatype Column In SQL Server 2000

Jan 17, 2008

HI,
I'm trying to implement a site search.  The only problem is that some of the pages have more than 8000 characters (like the press release pages) so I had to use the TEXT datatype (sql server 2000).  I wrote a simple stored procedure to query the column, however it does not return any results.  I'm assuming this is due to the fact that it is the TEXT datatype.  ANY help would be GREATLY appreciated.  Code below:
  CREATE PROCEDURE sp_SiteSearch
@keyword text

AS

SELECT PageText
FROM tbl_Pages
WHERE PageText LIKE '%@keyword%'
GO 

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved