Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I m getting error of Index was outside the bounds of the array.

loook at the code in bold

[b]Dim arrBid = Split(objBid.getMaxBidInfo(auctionId), ";")
           bidderId = arrBid(0)
          bidPrice = CInt(arrBid(1))[/b]


Public Function getBasicInfo(ByVal uid As Integer) As String
       Dim myDataReader As SqlDataReader
       Dim s_b_Info As String
       Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
       Dim myCommand As SqlCommand = New SqlCommand("Select uName,email from t_user where uId=" & uid & "", myConnection)
       myConnection.Open()

       Try
           myDataReader = myCommand.ExecuteReader()
           If myDataReader.Read() Then
[b]s_b_Info = myDataReader.Item("uName") & "," & myDataReader.Item("email")[/b]                     
       End If
       Catch b As Exception
           Return b.ToString
       End Try

Edited by Robby

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...