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. [Solved]Insert statement against a FoxPro database isn't commited using ODBCConnection in C#

[Solved]Insert statement against a FoxPro database isn't commited using ODBCConnection in C#

Scheduled Pinned Locked Moved Database
databasebeta-testingcsharpcomtesting
1 Posts 1 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.
  • L Offline
    L Offline
    Larantz
    wrote on last edited by
    #1

    Hi everyone. I'm making a custom tool for registering working hours for my employer against a Visual FoxPro database. I've created a procedure for executing sql queries against the database, but my insert statments aren't commited. The return value (affected rows) says that the query was successfull. I'm using a normal _"insert into (col1, col2, col(n)) VALUES(val1, val2, val(n))" statement - so nothing fancy. I've tried using transactions and myTransaction.Commit(); without success. I've also tried using keywords like "GO" or "COMMIT" in the query - but the FoxPro ODBC driver isn't too keen on those keywords. :) Am I missing something here? I thought ODBCCommand.ExecuteNonQuery() used the auto-commit property. Is there and specific properties that must be set, or keywords I must include to make it commit? Sidenote: If I copy/paste the query into an ODBC tool (freeware tool I just downloaded for testing purpouses) and execute the query, the row is added successfully. I'd really appreciate any feedback you've got. -Larantz- -- modified at 5:18 Monday 22nd October, 2007 I copied the database into a cvs folderstructure the other day. Forgot to update the configuration file with the connectionstring the very next day... *humble Larantz signing out* -Larantz-

    for those about to code, we salute you
    http://www.itverket.no

    Please refer to the Forum Guidelines for appropriate posting.

    _

    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