cancel
Showing results for 
Search instead for 
Did you mean: 

Recordset Issue

Former Member
0 Kudos

Experts,

I have written

Dim query As String = "Select DateDiff (dd, getdate(). ExpDate) from OBTN where DistNumber = ' " & BatchNum & " ' "

MessageBox.Show (oRec.Fields.Item (0).Value) is giving invalid index etc...

How to get this value?

It will always return 1 value.

so looping can be excaped.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

dear rupa,

Please Note: The datediff() function requires 3 arguments..

DateDiff (dd, getdate(). ExpDate)

Pls write

DateDiff (dd, getdate(), ExpDate)

Dim query As String = "Select DateDiff (dd, getdate(), ExpDate) from OBTN where DistNumber = ' " & BatchNum & " ' "

MessageBox.Show (oRec.Fields.Item (0).Value)   '--is giving invalid index etc...

Thanks and Regards,

kaviparshu

Answers (0)