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
I dont know enough about Direct casting to get round this
could someone help with an example please?



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))


and so simple too!


Be a part of the DaniWeb community

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