Connecting Tech Pros Worldwide Help | Site Map

What do the field type numbers returned in the debug window mean?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 12:41 PM
MLH
Guest
 
Posts: n/a
Default What do the field type numbers returned in the debug window mean?

I have this little snippet running whenever I want to list my table
field names in the debug window, along with their field types...
For i = 0 To TempRecordset.Fields.Count - 1
Debug.Print TempRecordset.Fields(i).Name; " ";
Debug.Print ", "; TempRecordset.Fields(i).Type
Next i

I don't understand the numbers returned for field type. Take
a look at the following sample output...

Fields in tblENF263SpecificInfo:
ENF263ID , 4
VehicleJobID , 4
LaborCost , 5
MatlsCost , 5
TowCost , 5
StorageCost , 5
OtherCost , 5
OtherDescr , 12
MatlsList , 12
SaleDate , 8
SaleHour , 10

What do these numbers mean?

  #2  
Old November 13th, 2005, 12:41 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: What do the field type numbers returned in the debug window mean?


"MLH" <CRCI@NorthState.net> wrote in message
news:qg1gf15sr0q1rontroj0i91bmjbihjhk6a@4ax.com...[color=blue]
>I have this little snippet running whenever I want to list my table
> field names in the debug window, along with their field types...
> For i = 0 To TempRecordset.Fields.Count - 1
> Debug.Print TempRecordset.Fields(i).Name; " ";
> Debug.Print ", "; TempRecordset.Fields(i).Type
> Next i
>
> I don't understand the numbers returned for field type. Take
> a look at the following sample output...
>
> Fields in tblENF263SpecificInfo:
> ENF263ID , 4
> VehicleJobID , 4
> LaborCost , 5
> MatlsCost , 5
> TowCost , 5
> StorageCost , 5
> OtherCost , 5
> OtherDescr , 12
> MatlsList , 12
> SaleDate , 8
> SaleHour , 10
>
> What do these numbers mean?[/color]


What are field type numbers?


  #3  
Old November 13th, 2005, 12:41 PM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: What do the field type numbers returned in the debug window mean?

dim tdf as dao.tabledef
dim fld as dao.field

set tdf=dbengine(0)(0).tabledefs(strTabledef)
for each fld in tdf.fields
debug.print fld.name, fld.type
next fld

the type field is numeric. Most handy if you want to create fields in
code...

  #4  
Old November 13th, 2005, 12:42 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: What do the field type numbers returned in the debug window mean?


<pietlinden@hotmail.com> wrote in message
news:1123556289.066918.283900@z14g2000cwz.googlegr oups.com...[color=blue]
> dim tdf as dao.tabledef
> dim fld as dao.field
>
> set tdf=dbengine(0)(0).tabledefs(strTabledef)
> for each fld in tdf.fields
> debug.print fld.name, fld.type
> next fld
>
> the type field is numeric. Most handy if you want to create fields in
> code...
>[/color]


Thanks! But I don't know VBA code--or whatever that is. I only use macros
(Access 97).



  #5  
Old November 13th, 2005, 12:42 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: What do the field type numbers returned in the debug window mean?

Nope, this one's from The Impersonator. Keep it up, wise guy, and we'll
sentence you to be Governor of California -- a fate worse than using macros.

"Larry Linson" <nospam@nospam.net> wrote in message
news:1123553620.2f57af0d4c32d7e586ab2ace6254785a@t eranews...[color=blue]
>
> "MLH" <CRCI@NorthState.net> wrote in message
> news:qg1gf15sr0q1rontroj0i91bmjbihjhk6a@4ax.com...[color=green]
>>I have this little snippet running whenever I want to list my table
>> field names in the debug window, along with their field types...
>> For i = 0 To TempRecordset.Fields.Count - 1
>> Debug.Print TempRecordset.Fields(i).Name; " ";
>> Debug.Print ", "; TempRecordset.Fields(i).Type
>> Next i
>>
>> I don't understand the numbers returned for field type. Take
>> a look at the following sample output...
>>
>> Fields in tblENF263SpecificInfo:
>> ENF263ID , 4
>> VehicleJobID , 4
>> LaborCost , 5
>> MatlsCost , 5
>> TowCost , 5
>> StorageCost , 5
>> OtherCost , 5
>> OtherDescr , 12
>> MatlsList , 12
>> SaleDate , 8
>> SaleHour , 10
>>
>> What do these numbers mean?[/color]
>
>
> What are field type numbers?
>[/color]


  #6  
Old November 13th, 2005, 12:42 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: What do the field type numbers returned in the debug window mean?

All right, Impersonator... off to Sacramento you go. Just tell the current
occupant of the Governator's mansion to get out of your way or you'll beat
up on him.

"Larry Linson" <nospam@nospam.net> wrote in message
news:1123557316.db206258e3e103247035be530125bb89@t eranews...[color=blue]
>
> <pietlinden@hotmail.com> wrote in message
> news:1123556289.066918.283900@z14g2000cwz.googlegr oups.com...[color=green]
>> dim tdf as dao.tabledef
>> dim fld as dao.field
>>
>> set tdf=dbengine(0)(0).tabledefs(strTabledef)
>> for each fld in tdf.fields
>> debug.print fld.name, fld.type
>> next fld
>>
>> the type field is numeric. Most handy if you want to create fields in
>> code...
>>[/color]
>
>
> Thanks! But I don't know VBA code--or whatever that is. I only use
> macros (Access 97).
>
>
>[/color]


  #7  
Old November 13th, 2005, 12:42 PM
David W. Fenton
Guest
 
Posts: n/a
Default Re: What do the field type numbers returned in the debug window mean?

MLH <CRCI@NorthState.net> wrote in
news:qg1gf15sr0q1rontroj0i91bmjbihjhk6a@4ax.com:
[color=blue]
> I have this little snippet running whenever I want to list my
> table field names in the debug window, along with their field
> types...
> For i = 0 To TempRecordset.Fields.Count - 1
> Debug.Print TempRecordset.Fields(i).Name; " ";
> Debug.Print ", "; TempRecordset.Fields(i).Type
> Next i
>
> I don't understand the numbers returned for field type. Take
> a look at the following sample output...
>
> Fields in tblENF263SpecificInfo:
> ENF263ID , 4
> VehicleJobID , 4
> LaborCost , 5
> MatlsCost , 5
> TowCost , 5
> StorageCost , 5
> OtherCost , 5
> OtherDescr , 12
> MatlsList , 12
> SaleDate , 8
> SaleHour , 10
>
> What do these numbers mean?[/color]

Look up TYPE in A97 Help, and choose the DAO version. This takes you
to a listing of all the constants defined for this and an
explanation of which constant applies to which kind of Jet field.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.