I have a datatable - 1 of the columns is a double
so i read it like this
Dim num As Double = Drow(1)
I get an error about late binding here (with option strict on)

I have tried converting to a double eg
Dim num As Double = convert.toDouble(Drow(1)) but that makes no difference
and
I dont know enough about Direct casting to get round this
could someone help with an example please?

thanks

Mike

Recommended Answers

Hey Mike,

Try This>>>

Dim ds As New DataSet
'For ds.Tables(0)
 Dim Drow As DataRow = ds.Tables(0).Rows(1) 
 Dim num As Double = CDbl(Drow(1))
Jump to Post

All 2 Replies

Hey Mike,

Try This>>>

Dim ds As New DataSet
'For ds.Tables(0)
 Dim Drow As DataRow = ds.Tables(0).Rows(1) 
 Dim num As Double = CDbl(Drow(1))

Thanks!:)

and so simple too!

Mike

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.