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. Web Development
  3. ASP.NET
  4. Problem getting information from a database. [modified]

Problem getting information from a database. [modified]

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
4 Posts 3 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.
  • M Offline
    M Offline
    Muntyness
    wrote on last edited by
    #1

    Edit: Bah. problem has been fixed. -- Hi, I have a slight problem with getting records from a database. The problem is simply when I use the following SQL string, it throws me up an error message. Problem string: "SELECT * FROM IDs WHERE id='2'" However when I use this SQL string, it works. Working SQL string: "SELECT * FROM IDs WHERE name='bob'" I have no idea why one is working and the other isn't. The only thing I could think of is a type mismatch (The id field is set to AutoNumber). I get the same error when trying to use both Strings and Integers. Anyone have any ideas? - Munty -- modified at 10:20 Thursday 26th July, 2007

    B P 2 Replies Last reply
    0
    • M Muntyness

      Edit: Bah. problem has been fixed. -- Hi, I have a slight problem with getting records from a database. The problem is simply when I use the following SQL string, it throws me up an error message. Problem string: "SELECT * FROM IDs WHERE id='2'" However when I use this SQL string, it works. Working SQL string: "SELECT * FROM IDs WHERE name='bob'" I have no idea why one is working and the other isn't. The only thing I could think of is a type mismatch (The id field is set to AutoNumber). I get the same error when trying to use both Strings and Integers. Anyone have any ideas? - Munty -- modified at 10:20 Thursday 26th July, 2007

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Muntyness wrote:

      it throws me up an error message

      What error message it return?


      I Love SQL

      M 1 Reply Last reply
      0
      • B Blue_Boy

        Muntyness wrote:

        it throws me up an error message

        What error message it return?


        I Love SQL

        M Offline
        M Offline
        Muntyness
        wrote on last edited by
        #3

        Ahhh goddammint! I figured out what the problem was. I was using "SELECT * FROM IDs WHERE id='2'" when I should have been using "SELECT * FROM IDs WHERE id=2". :mad:

        1 Reply Last reply
        0
        • M Muntyness

          Edit: Bah. problem has been fixed. -- Hi, I have a slight problem with getting records from a database. The problem is simply when I use the following SQL string, it throws me up an error message. Problem string: "SELECT * FROM IDs WHERE id='2'" However when I use this SQL string, it works. Working SQL string: "SELECT * FROM IDs WHERE name='bob'" I have no idea why one is working and the other isn't. The only thing I could think of is a type mismatch (The id field is set to AutoNumber). I get the same error when trying to use both Strings and Integers. Anyone have any ideas? - Munty -- modified at 10:20 Thursday 26th July, 2007

          P Offline
          P Offline
          Paddy Boyd
          wrote on last edited by
          #4

          Have you tried: "SELECT * FROM IDs WHERE id=2"

          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