Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6345141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:45:53+00:00 2026-05-24T20:45:53+00:00

I am working on a client interface that can connect to any DB by

  • 0

I am working on a client interface that can connect to any DB by passing the desired query in an input field and the server side (coded in C and using sql.h), parses this query and returns content in JSON format. I am able to accomplish this easily by using Select * from tablename query as i am able to get the number of rows using the count(*) query and i use this with a for loop to print my JSON into a buffer. How am i to accomplish the same for anyother query?

I read up somewhere that row-wise binding might help but whats the logic behind parsing a resultset into a json format? (under the assumption that i need the data in a row-wise format. example : {"Records" : [["col heading 1", "col heading 2", "col heading 3"], ["row content 1", "row content 2", "row content 3"]...]})

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:45:54+00:00Added an answer on May 24, 2026 at 8:45 pm

    ODBC only offers a way (SQLRowCount) to find out the number of affected rows for UPDATE / DELETE / INSERT Statements – see http://msdn.microsoft.com/en-us/library/ms711835%28v=VS.85%29.aspx…

    IF you want to find out the number of rows of a SELECT you either execute the query a second time as SELECT COUNT(*) OR you just loop over the result set and count the rows ODBC delivers…

    see http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/6fe5403d-900c-4b07-9d00-1f42731b5602
    and How to Get The Count or The Number Of Rows In A Result Set In PHP using ODBC Connection?

    NOTE: Although the second link mentions PHP, the answer is language-agnostic since the cause of the behaviour lies in the ODBC standard and the used ODBC driver.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a client-server application that uses boost::serialization library for it's serialization
Im currently working on an RMI client that will talk to an RMI server
The project I'm currently working on needs to interface with a client system that
I'm working with a client that needs to generate millions of the alphanumeric codes
I'm working on a client-server Android application and trying to figure out how to
I'm working on a client/server library for a legacy RPC implementation and was running
I am working on a client server system, and am running into issues where
I've got a working SOAP::Lite client. It works against an established server, but so
I'm working on a client/server application in C#, and I need to get Asynchronous
I'm working on a client server app using the Tracer Bullet approach advocated in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.