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

problems creating dataset

Status
Not open for further replies.

stx

Programmer
Sep 24, 2002
62
BE
Hi

This is my code (essential pieces):

Code:
dim rstop10 as adodb.recordset,netto as double
Set rstop10 = New ADODB.Recordset
With rstop10
   .Fields.Append "netto", adDecimal, , adFldUpdatable
   .CursorType = adOpenKeyset
   .LockType = adLockOptimistic
   .Open
End With

netto = 13.25
rstop10.Addnew array("netto"),array(netto)
...

This piece of code almost works fine but when i check the value in my dataset i get '13' instead of '13.25'.

Does anyone know why i'm losing my digits after the comma?

Defining the dataset column 'netto' as a string-column is not an option because later i my code i need to sort the dataset on my column 'netto'.

Code:
rstop10.sort = "netto desc"

thnx
 

JohnEfford: How do you know that "netto" should be currency? (very well it is, but cannot make that out above)

Anyways, a Single may be better in any case, and the main problem is the field defination...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top