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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fabricated Recordsets

Status
Not open for further replies.

ExtraD

Programmer
Jul 6, 2005
41
NL
Hi,

I found this code to create disconected recordsets. But how can i use a decimal value. Because he creates always a Long type of field.


Set oRS = New ADODB.Recordset
oRS.CursorLocation = adUseClient
oRS.CursorType = adStatic
oRS.LockType = adLockBatchOptimistic
'Add a few fields
With oRS.Fields
.Append "LastName", adDecimal, , adFldIsNullable
.Append "FirstName", adDecimal, , adFldIsNullable
.Append "HireDate", adDecimal
End With
oRS.Open


thanx,
 
Looks OK (except that adStatic should be adOpenStatic). It creates fields of type decimal (adDecimal = 14) on my system.

Bit strange though. I would assume that "LastName" and "FirstName" would be text fields and "HireDate" would be a date field ... or are you just experimenting at this point?
 
Thats correct i'm experimenting to get decimals in it. but i was to fast i think. i found the option NumericScale and Precision.

thanks for the quick response!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top