Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Query To get datatype info


Message #1 by "Supratim Mukhopadhyay" <callsupratim@r...> on Tue, 11 Jun 2002 06:02:29
I want to get the datatypes of the columns of a table in the MS Access 
Database. Is there any table in the database which stores this 
information, like the USER_TAB_COLUMNS table of the Oracle Database ?
Please help. I am using ASP as the server-side scripting language. Even a 
fnction or methos in ASP(if any) will do.
Thanks in advance
Supratim
Message #2 by "Simon Chambers" <chamberssh@h...> on Tue, 11 Jun 2002 09:59:35 +0000
hi,

i use this snippit of code to read the types and change them if needed:

Set cm = CreateObject("ADODB.Command")
Set rs = CreateObject("ADODB.RecordSet")
cm.ActiveConnection = DatabaseString
sSQL = "select * from books"
cm.CommandText = sSQL
cm.CommandType = 1
Set rs = cm.Execute
Do While Not rs.EOF
For Each fld In rs.Fields
  If (fld.type = 5 )Then
   .......
  end if
Next fld
rs.Movenext
Loop
rs.Close
Set rs = Nothing
Set cm = Nothing

>From: "Supratim Mukhopadhyay" <callsupratim@r...>
>Reply-To: "Access ASP" <access_asp@p...>
>To: "Access ASP" <access_asp@p...>
>Subject: [access_asp] Query To get datatype info
>Date: Tue, 11 Jun 2002 06:02:29
>
>I want to get the datatypes of the columns of a table in the MS Access
>Database. Is there any table in the database which stores this
>information, like the USER_TAB_COLUMNS table of the Oracle Database ?
>Please help. I am using ASP as the server-side scripting language. Even a
>fnction or methos in ASP(if any) will do.
>Thanks in advance
>Supratim


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


  Return to Index