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. General Programming
  3. C / C++ / MFC
  4. Please help...

Please help...

Scheduled Pinned Locked Moved C / C++ / MFC
databasesql-serversysadminhelp
2 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    The following proc should find the record(contract)in db based on type(takes the position in the file and compare to the Type in the db).Proc. should return contract for use in different proc. Please help...I can't understand why it's not working. dbproc_get1 ->connection to SQL int find_record() {dbcmd (dbproc_get1, "select contract from type"); dbfcmd(dbproc_get1,"where type = %d",Type); // Send the command to SQL Server and start execution. dbsqlexec (dbproc_get1); // Process the results. if (dbresults (dbproc_get1) == SUCCEED) {dbbind (dbproc_get1, 1, INTBIND, 0, (BYTE *) &contract); while (dbnextrow (dbproc_get1) != NO_MORE_ROWS) return(1); }:confused:

    U 1 Reply Last reply
    0
    • L Lost User

      The following proc should find the record(contract)in db based on type(takes the position in the file and compare to the Type in the db).Proc. should return contract for use in different proc. Please help...I can't understand why it's not working. dbproc_get1 ->connection to SQL int find_record() {dbcmd (dbproc_get1, "select contract from type"); dbfcmd(dbproc_get1,"where type = %d",Type); // Send the command to SQL Server and start execution. dbsqlexec (dbproc_get1); // Process the results. if (dbresults (dbproc_get1) == SUCCEED) {dbbind (dbproc_get1, 1, INTBIND, 0, (BYTE *) &contract); while (dbnextrow (dbproc_get1) != NO_MORE_ROWS) return(1); }:confused:

      U Offline
      U Offline
      Ulf Ohlen
      wrote on last edited by
      #2

      Try appending an extra space to the first SQL string.

      dbcmd (dbproc_get1, "select contract from type ");

      -------------- "Aagh!! I'm a victim of a Random Act of Management!"

      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