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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. ADO and MSSQL...

ADO and MSSQL...

Scheduled Pinned Locked Moved Database
databasesql-serverhelpquestion
4 Posts 4 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi, I have two database files, an access database(jet) and a mssql database(mssqloledb). I'm tryng to execute the query "DELETE * FROM table1", so I've created a _CommandPtr variable. When I execute the command with the access database it works fine, but when I execute the command with the mssql it throws an exception 'DB_E_ERRORSINCOMMAND'. It's a sintax error in the sql. Is there any difference in the sintax of the sql statement between this two providers ? ps: I can't use "SELECT * FROM table1" with the mssql provider either. thanks.

    R H K 3 Replies Last reply
    0
    • A Anonymous

      Hi, I have two database files, an access database(jet) and a mssql database(mssqloledb). I'm tryng to execute the query "DELETE * FROM table1", so I've created a _CommandPtr variable. When I execute the command with the access database it works fine, but when I execute the command with the mssql it throws an exception 'DB_E_ERRORSINCOMMAND'. It's a sintax error in the sql. Is there any difference in the sintax of the sql statement between this two providers ? ps: I can't use "SELECT * FROM table1" with the mssql provider either. thanks.

      R Offline
      R Offline
      Roger Wright
      wrote on last edited by
      #2

      There are differences in syntax, but in this case it may be that your connection is trying to use the Access (Jet) provider instead of the MSSQL provider.

      "Welcome to Arizona!
      Drive Nice - We're Armed..."
      - Proposed Sign at CA/AZ Border

      1 Reply Last reply
      0
      • A Anonymous

        Hi, I have two database files, an access database(jet) and a mssql database(mssqloledb). I'm tryng to execute the query "DELETE * FROM table1", so I've created a _CommandPtr variable. When I execute the command with the access database it works fine, but when I execute the command with the mssql it throws an exception 'DB_E_ERRORSINCOMMAND'. It's a sintax error in the sql. Is there any difference in the sintax of the sql statement between this two providers ? ps: I can't use "SELECT * FROM table1" with the mssql provider either. thanks.

        H Offline
        H Offline
        Hesham Amin
        wrote on last edited by
        #3

        try to use fully qualified names : databasename.dbowner.tablename

        1 Reply Last reply
        0
        • A Anonymous

          Hi, I have two database files, an access database(jet) and a mssql database(mssqloledb). I'm tryng to execute the query "DELETE * FROM table1", so I've created a _CommandPtr variable. When I execute the command with the access database it works fine, but when I execute the command with the mssql it throws an exception 'DB_E_ERRORSINCOMMAND'. It's a sintax error in the sql. Is there any difference in the sintax of the sql statement between this two providers ? ps: I can't use "SELECT * FROM table1" with the mssql provider either. thanks.

          K Offline
          K Offline
          Kyle Chen
          wrote on last edited by
          #4

          Maybe you should use "DELETE FROM table1" for MSSQL. Just have a try.;) Kyle Chen

          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