|
-
May 2nd, 2007, 10:30 AM
#1
Thread Starter
Junior Member
[2005] Checking SQL 2000 Table's Field's Data Type Using Code
Is there any way either by SQL code or by some other means to check the data type of a field?
Thanks for the help.
Ado
-
May 2nd, 2007, 11:10 AM
#2
Re: [2005] Checking SQL 2000 Table's Field's Data Type Using Code
Via code - using SQLDMO.
Via SQL using the syscolumns table
-tg
-
May 2nd, 2007, 11:12 AM
#3
Thread Starter
Junior Member
Re: [2005] Checking SQL 2000 Table's Field's Data Type Using Code
SQL = "SELECT systypes.name FROM sysobjects,syscolumns,systypes WHERE sysobjects.name= '" & strTable & "' AND syscolumns.id=sysobjects.id AND syscolumns.name='" &_
strField & "' AND systypes.xtype=syscolumns.xtype"
Thanks for the reply, figured it out after i started thinking about the system tables.
Thanks for the help.
Ado
Last edited by Cyberskull; May 2nd, 2007 at 11:17 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|