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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.