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. Problem with SQL FETCH

Problem with SQL FETCH

Scheduled Pinned Locked Moved Database
c++databasehelp
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.
  • C Offline
    C Offline
    Cheickna
    wrote on last edited by
    #1

    Hi, I have some problem with this query i execute under visual C++6.0 "SELECT Nom, CodePostal, Sum(Montant) AS MontantRemb, DateTraitement FROM TClient GROUP BY Nom, CodePostal, Montant,DateTraitement HAVING (((DateTraitement)=#09/05/2002#));" In Microsoft Access interface it work well but if i execute it via ODBC like this : retcode = SQLExecDirect(m_hstmt,(SQLCHAR*)strSQL, SQL_NTS); this isntruction work also but i have a problem with SQL Fetch: while (( retcode = SQLFetch(m_hstmt))!= SQL_NO_DATA) { SQLGetData(m_hstmt, 1, SQL_C_CHAR, szNomClient, 25, &cbName); SQLGetData(m_hstmt, 2, SQL_C_CHAR, szCodePostal, 6, &cbName); SQLGetData(m_hstmt, 3, SQL_C_CHAR, szMontant, 16, &cbName); SQLGetData(m_hstmt, 4, SQL_C_CHAR, szDateTraitement, 11, &cbName); }Here retcode return 100 and i can't obtain my data Thanks in advance for any help

    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