Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:48:58+00:00 2026-05-15T23:48:58+00:00

i am using VS 2010 to develop a site that gets some data from

  • 0

i am using VS 2010 to develop a site that gets some data from a database.

but i just keep getting this error.

‘No value given for one or more required parameters.’

here is my code

Public Function getSessionDetails(ByVal roomId As String) As ArrayList

Dim sql As String
    sql = "SELECT * FROM Table1 WHERE RoomId = ?"
    Dim dbComm As New OleDbCommand(sql, dbConn)

    'dbComm.Connection.Open()
    dbComm.CommandText = sql
    dbComm.Parameters.Add("RoomId", System.Data.OleDb.OleDbType.BSTR).Value = roomId
    dbConn.Open()
    'dbComm.ExecuteNonQuery()


    Dim dbRead As OleDbDataReader = dbComm.ExecuteReader() 'System.Data.CommandBehavior.CloseConnection)

    Dim arr As New ArrayList

    Try
        While dbRead.Read()
            arr.Add(New SessionDetails(dbRead.GetValue(2).ToString, dbRead.GetValue(3).ToString, dbRead.GetValue(4).ToString, dbRead.GetValue(6).ToString, _
                                       dbRead.GetValue(5).ToString, dbRead.GetValue(7).ToString, dbRead.GetValue(8).ToString))
        End While
    Catch ex As Exception

    End Try

    Try
        'sort arr by date using bubble
        For i As Integer = 1 To arr.Count - 1
            Dim sesTop As SessionDetails = arr(i)
            Dim sesBot As SessionDetails = arr(i - 1)
            Dim sesTmp As SessionDetails

            If sesBot.sessionDate < sesTop.sessionDate Then
                'swap them
                sesTmp = arr(i)
                arr(i) = arr(i - 1)
                arr(i - 1) = sesTmp
                i = 0
            ElseIf sesBot.sessionDate = sesTop.sessionDate And sesBot.StartTime < sesTop.StartTime Then
                'swap them
                sesTmp = arr(i)
                arr(i) = arr(i - 1)
                arr(i - 1) = sesTmp
                i = 0
            End If
        Next
    Catch ex As Exception

    End Try

    'Dim se As SessionDetails
    'For Each se In arr
    '    If se.sessionDate < Now Then
    '        arr.Remove(se)
    '    End If
    'Next

    dbRead.Close()
    dbConn.Close()

    Return arr
End Function

Thanks for any help

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:48:58+00:00Added an answer on May 15, 2026 at 11:48 pm

    Change these two lines

    sql = "SELECT * FROM Table1 WHERE RoomId = @RoomId"
    
    
    dbComm.Parameters.Add("@RoomId", System.Data.OleDb.OleDbType.BSTR).Value = roomId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to develop code using Visual Studio 2010. I just
I was asked to develop a connection to download emails from Exchange 2010 using
We're using Visual Studio 2010 professional to develop and maintain our company ASP (classic
Using Excel 2010 and SQL Server 2008 R2. I used import and export data
I am using SharePoint 2010 and have a customized newform.aspx and editform.aspx that I
I am using SharePoint Foundation (Sharepoint 2010) to develop a workflow in Visual Studio
I'm using VS 2010 to develop an Excel 2007 COM Add-In. Because it's a
I am using Visual C# Express 2010 to develop an application for the Unity3D
I want to develop a program using VB.Net 2010, and I want to use
I understand that you can't develop in Visual Studio 2010 for a remote Sharepoint

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.