Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Data Parameters

Data Parameters

Scheduled Pinned Locked Moved Database
databasehelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robert Gronenthal
    wrote on last edited by
    #1

    I am having a significant brain block... I am trying to take a string variable and use that as the criteria in a select statement to a sql 2000 database. I have tried the parameters collection in the data adapter but I cannot seem to get it to work. HELP.... Thanks Bob Gronenthal

    B 1 Reply Last reply
    0
    • R Robert Gronenthal

      I am having a significant brain block... I am trying to take a string variable and use that as the criteria in a select statement to a sql 2000 database. I have tried the parameters collection in the data adapter but I cannot seem to get it to work. HELP.... Thanks Bob Gronenthal

      B Offline
      B Offline
      Bill Dean
      wrote on last edited by
      #2

      Tried the Select method on the DataTable? Better even might be to modify the SelectCommand.CommandText on your DataAdapter. It's hard to say more without more details about what you are trying to do and how... Hope this helps, Bill

      R 1 Reply Last reply
      0
      • B Bill Dean

        Tried the Select method on the DataTable? Better even might be to modify the SelectCommand.CommandText on your DataAdapter. It's hard to say more without more details about what you are trying to do and how... Hope this helps, Bill

        R Offline
        R Offline
        Robert Gronenthal
        wrote on last edited by
        #3

        I have a vb.net program that is polling 911 data for new entries by a position number. When the user 'logs into the program' he/she puts the position number that they are at. I need the latest 911 data to populate there screen by position number. I am storing their logon entry as a public variable so that I can user it anywhere in the project to 'tag records' by them. I would like the select statement to use this variable to only retrieve the records for that position. Thanks, Bob

        B 1 Reply Last reply
        0
        • R Robert Gronenthal

          I have a vb.net program that is polling 911 data for new entries by a position number. When the user 'logs into the program' he/she puts the position number that they are at. I need the latest 911 data to populate there screen by position number. I am storing their logon entry as a public variable so that I can user it anywhere in the project to 'tag records' by them. I would like the select statement to use this variable to only retrieve the records for that position. Thanks, Bob

          B Offline
          B Offline
          Bill Dean
          wrote on last edited by
          #4

          Hi Bob, I am guessing you have a DataAdapter somewhere(maybe created when you dragged a table onto the form designer?). I'll assume it's named DataAdapter1, though yours might not be. Somewhere in your program you have code that looks like: DataAdapter1.Fill(DataSet1) or DataAdapter1.Fill(DataTable1) What you might want to try is, just before you call the fill do something like: DataAdapter1.SelectCommand.CommandText = "select * from WHATEVER_YOUR_TABLE_NAME_IS where YOUR_COLUMN='" & THE_VARIABLE & "'" Bill

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups