Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating OLE field in Access on the fly

Status
Not open for further replies.

treyball3

Programmer
Jun 20, 2001
74
US
Ok, here's my deal, I'm creating an access db from scratch on the fly. I need to create an OLE field in this db, but I'm having trouble doing so. For other fields I use something similar to this...

Code:
fld.Name = "Date"
fld.Type = dbDate
tbl.Fields.Append fld
Set fld = Nothing
    
fld.Name = "Hold"
fld.Type = dbBoolean
tbl.Fields.Append fld
Set fld = Nothing
    
fld.Name = "Amount"
fld.Type = dbSingle
tbl.Fields.Append fld
Set fld = Nothing
    
fld.Name = "Notes"
fld.Type = dbText
fld.Size = 255
tbl.Fields.Append fld
Set fld = Nothing

so for my OLE field, I use what for the fld.Type....?

Code:
fld.Name = "Logo"
fld.Type = dbXXX
tbl.Fields.Append fld
Set fld = Nothing

Does anyone know? I can't seem to find this info anywhere and its driving me crazy!! :)

Thanks in advance.



Thanks - Todd
 
ok, I figured this out. Had to "reverse engineer" it. I created the field in my DB, then stepped through the code and in my recordset when I was on that record, I did a
Code:
?rs("fieldname").Type
in the immediate window to figure out what the code was using. Turns out that its a dbLongBinary, in case anyone else is wondering :)



Thanks - Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top