|
|
 |
RE: FN-FORUM: SQL ERROR - HELP REQUIRED PLEASE
date posted 8th January 2004 15:01
Hi Pam
I'd guess that there isn't a column called Maximum in the return
datareader.
Norman
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of PAMELA
WHITTAKER
Sent: 08 January 2004 15:37
To: FN-FORUM / [EMAIL REMOVED]
Subject: FN-FORUM: SQL ERROR - HELP REQUIRED PLEASE
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
--
** Get all the Freelance Work you Can Handle *
The Web Design Business Kit will show you proven tactics
and strategies for marketing your business, winning bids, managing
projects and pricing your work. Free Shipping Worldwide. Read more & get
free chapters at: http://www.sitepoint.com/launch/b7c91e/3/4
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|