|
|
 |
FN-FORUM: SQL ERROR - HELP REQUIRED PLEASE
date posted 8th January 2004 14:58
Hi,
I am getting the following error
"Exception Details: System.IndexOutOfRangeException: Maximum"
the line I am getting it on is Return drFT("Maximum")
Could some one tell me what I have dobe wrong please
Thanks
Pam
The .net function is
Private Function _MaxBasketID() As Integer
Dim connFT As New OleDbConnection(_ConnectionString)
Dim cmdFT As New OleDbCommand
cmdFT.Connection = connFT
cmdFT.CommandType = CommandType.Text
connFT.Open()
cmdFT.CommandText = "SELECT 'Maximum' = MAX(tblOrder.orderBasketID) FROM
tblOrder;"
Dim drFT As OleDbDataReader
drFT = cmdFT.ExecuteReader
If drFT.Read Then
Return drFT("Maximum")
End If
drFT.Close()
connFT.Close()
End Function
|
 |
|