Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old November 13th, 2005, 01:41 PM
MLH
Guest
 
Posts: n/a
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, 01:41 PM
Larry Linson
Guest
 
Posts: n/a

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, 01:41 PM
pietlinden@hotmail.com
Guest
 
Posts: n/a

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, 01:42 PM
Larry Linson
Guest
 
Posts: n/a

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, 01:42 PM
Larry Linson
Guest
 
Posts: n/a

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, 01:42 PM
Larry Linson
Guest
 
Posts: n/a

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, 01:42 PM
David W. Fenton
Guest
 
Posts: n/a

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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
.Net frameword Resources ( vb.net , asp.net etc...) shamirza answers 0 January 17th, 2007 08:05 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 07:46 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 03:55 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 5 November 14th, 2005 12:36 PM