Results 1 to 3 of 3

Thread: [2005] Checking SQL 2000 Table's Field's Data Type Using Code

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    [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
    AdoSoft INC
    A Software Development Company

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [2005] Checking SQL 2000 Table's Field's Data Type Using Code

    Via code - using SQLDMO.
    Via SQL using the syscolumns table

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    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.
    AdoSoft INC
    A Software Development Company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width