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 7630121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:01:06+00:00 2026-05-31T06:01:06+00:00

i am reading data from a mysql database table. I have populated a dropdown

  • 0

i am reading data from a mysql database table.
I have populated a dropdown with the relevant slections, i want the rest of the form to load data once i select the plate number …

the data is in the same table …

Sub getdata()
    Dim ds_vehicles As DataSet = GetDataSet("select * from tbl_vehicles where fld_ownerSNO='" & Session("logID") & "'", "tbl_v")
    DTPageData = ds_vehicles.Tables("tbl_v")
    ddl_plate.DataSource = ds_vehicles.Tables("tbl_v")
    ddl_plate.DataTextField = "fld_plate"
    ddl_plate.DataValueField = "fld_vno"
    ddl_plate.DataBind()

End Sub

Protected Sub ddl_plate_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddl_plate.SelectedIndexChanged

    'Dim ds_vehicles2 As DataSet = GetDataSet("select * from tbl_vehicles where fld_ownerSNO='" & Session("logID") & "' and fld_vin=" & sel_vno & "", "tbl_v2")
    'lbl_vin.Text = ds_vehicles2.Tables("tbl_v2").Rows(0).Item("fld_vin")

End Sub

Public Shared Function GetDataSet(ByVal cmdStr As String, ByVal tblName As String) As Data.DataSet
    OpenRemoteDataConnection()
    GetDataSet = New Data.DataSet
    Dim sqlcmd As New MySqlCommand(cmdStr, RConn)
    Dim sqladp As New MySqlDataAdapter
    sqladp.SelectCommand = sqlcmd
    sqladp.Fill(GetDataSet, tblName)
    CloseRemoteConnection()
End Function


Public Shared Sub OpenRemoteDataConnection()
    If RConn.State = Data.ConnectionState.Open Or RConn.State = Data.ConnectionState.Connecting Then RConn.Close()
    RConn = New MySqlConnection(dataFilePath)
    RConn.Open()
End Sub


Public Shared Sub CloseRemoteConnection()
    If RConn.State = Data.ConnectionState.Open Then RConn.Close()
End Sub

i am using the ablove class to conent to the datasbe…

There is already an open DataReader associated with this Connection which must be closed first.

i am reading/writing to dbase by a class that i have written that works 100%

  • 1 1 Answer
  • 0 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-31T06:01:07+00:00Added an answer on May 31, 2026 at 6:01 am

    As the error clearly states, you’re trying to do two things with the same connection at the same time.

    Either don’t share connections or close your data readers, depending on what the problem with your database class is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading data from a table( from a MySQL Database) with Hibernate SQL Query.
How can i Load Temptable on Server B by reading data from Server A
I have a weekly script that moves data from our live database and puts
I'm reading info from a pqsql database (and changed my engine from mysql) there
When reading data from the Input file I noticed that the ¥ symbom was
I'm reading data from a device which measures distance. My sample rate is high
I am reading data from multiple serial ports. At present I am using a
I'm reading data from a serial port using an event listener from the SerialPort
I'm reading data from a stream into a char array of a given length,
I am reading data from a file that has, unfortunately, two types of character

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.