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. SQL Query...

SQL Query...

Scheduled Pinned Locked Moved Database
csharpdatabasesql-serversysadmin
6 Posts 6 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.
  • J Offline
    J Offline
    Jamal Abdul Nasir
    wrote on last edited by
    #1

    --> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...

    SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'

    --> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...

    J A Nasir K

    L M I I M 5 Replies Last reply
    0
    • J Jamal Abdul Nasir

      --> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...

      SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'

      --> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...

      J A Nasir K

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Jamal Abdul Nasir wrote:

      doesn't work

      :)

      Luc Pattyn


      I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


      Local announcement (Antwerp region): Lange Wapper? Neen!


      1 Reply Last reply
      0
      • J Jamal Abdul Nasir

        --> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...

        SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'

        --> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...

        J A Nasir K

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        Read this article [^]

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • J Jamal Abdul Nasir

          --> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...

          SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'

          --> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...

          J A Nasir K

          I Offline
          I Offline
          i j russell
          wrote on last edited by
          #4

          When you catch the exception in your VB code, what does it say?

          1 Reply Last reply
          0
          • J Jamal Abdul Nasir

            --> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...

            SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'

            --> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...

            J A Nasir K

            I Offline
            I Offline
            i i i
            wrote on last edited by
            #5

            i think so you are having time also with date check that and try to also format your date :)

            Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it

            1 Reply Last reply
            0
            • J Jamal Abdul Nasir

              --> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...

              SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'

              --> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...

              J A Nasir K

              M Offline
              M Offline
              Md Marufuzzaman
              wrote on last edited by
              #6

              Well.. When you run this transact-sql statement.. probably you face that the datetime auto reformation like '2009-10-01' to CONVERT(DATETIME, '2009-10-01 00:00:00', 102). You should consider this..

              Thanks Md. Marufuzzaman


              Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you. I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.

              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