Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2005, 11:25 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Storing hyperlink

Hi,

I want to store a word "puzzle" which is hyperlinked to a site www.puzzles.com and this will be stored in a column link_type in a table.What will be the data type of the field link_type.
How can I insert multiple values like the above.

What is the query to see the data type of the columns of a table?

Please help!!
 
Old November 24th, 2005, 11:36 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

To get thedata type of column, you can query the syscolumns table. First, get the id of the table you want from the sysobjects table, then query the syscolumns table using that id. For example:

SELECT * FROM SysColumns WHERE id = 21575115

The column you are looking for in the syscolumns table is the xtype column. However, this column doesn't list the data types as "varchar" or "int" but as a number. For example, 56 is an int, and 61 is a datetime data type. 60 is a money data type.

You could store the link as varchar and you should be good.

Scott






Similar Threads
Thread Thread Starter Forum Replies Last Post
storing values paulg0702 Excel VBA 1 April 25th, 2007 11:33 PM
Storing a DataSet rit01 ASP.NET 1.x and 2.0 Application Design 0 October 23rd, 2006 04:04 PM
Storing Problem! doosti Classic ASP Databases 3 December 5th, 2004 10:18 PM
Storing Calculated Fields dearnne Access 3 September 2nd, 2004 05:30 PM
Storing Calculated Fields dearnne Access VBA 1 August 30th, 2004 10:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.