Click here to Skip to main content
16,004,991 members
Home / Discussions / Database
   

Database

 
GeneralMicrosoft Desktop Engine Pin
Ankwa17-Apr-04 9:48
Ankwa17-Apr-04 9:48 
GeneralRe: Microsoft Desktop Engine Pin
earl17-Apr-04 9:58
earl17-Apr-04 9:58 
GeneralRe: Microsoft Desktop Engine Pin
Mike Ellison18-Apr-04 19:49
Mike Ellison18-Apr-04 19:49 
GeneralRe: Microsoft Desktop Engine Pin
jimpar19-Apr-04 4:30
jimpar19-Apr-04 4:30 
GeneralProblem in Using ADO in Visual C++ with SQL Server Pin
Touseef Afzal17-Apr-04 9:38
Touseef Afzal17-Apr-04 9:38 
GeneralRe: Problem in Using ADO in Visual C++ with SQL Server Pin
Hesham Amin17-Apr-04 20:46
Hesham Amin17-Apr-04 20:46 
GeneralRe: Problem in Using ADO in Visual C++ with SQL Server Pin
Roger Wright19-Apr-04 7:05
professionalRoger Wright19-Apr-04 7:05 
GeneralDatabase Results Strategy Pin
earl17-Apr-04 9:18
earl17-Apr-04 9:18 
Folks,

I mostly do systems programming but got suckered into writing an app for a business run by my brother. This is a POS system which is backed by SQL Server. I'm using WTL on the client and ODBC (because it seemed simple / straightforward) to communicate with the db.

The question: there are a series of queries / reports that are run against the server. Exactly what is included in any individual report is variable -- eg a net sales report may or may not include gift certificates, employee discounts, etc.

My question: what is the best strategy for passing query results around? They can be (1) displayed on screen, (2) saved to CSV, or (3) printed. I expect there may be future options in the future, such as blowing them directly into QuickBooks.

Do people typically pass around the SQL statement handle and let the various consuming functions directly pull data via SQLFetch? That seems like a really bad idea. I currently have the SQL functions isolated and pull query results into an internal data structure -- vectors of structs right now. Unfortunately, I have to create structs for each query and pass around vectors. How do you deal with the fact that there are many optional fields -- just create an entry in the struct for each potential field? Also, what is the most convenient manner to deal with the fact that certain fields may be null?

Are there better ways to do this?

Thanks,

Earl
Generalget DB Schema Pin
Silly Boy17-Apr-04 3:33
Silly Boy17-Apr-04 3:33 
GeneralRe: get DB Schema Pin
Mazdak17-Apr-04 3:39
Mazdak17-Apr-04 3:39 
GeneralUsing OJB.NET in an application Pin
ingramj17-Apr-04 2:01
ingramj17-Apr-04 2:01 
GeneralPlease Help !!!. How to set a backup sql server Pin
Member 101882317-Apr-04 1:09
Member 101882317-Apr-04 1:09 
GeneralRe: Please Help !!!. How to set a backup sql server Pin
RichardGrimmer18-Apr-04 22:21
RichardGrimmer18-Apr-04 22:21 
GeneralAdding an unseparated date/time value to MSDE Pin
monrobot1316-Apr-04 14:08
monrobot1316-Apr-04 14:08 
GeneralRe: Adding an unseparated date/time value to MSDE Pin
monrobot1316-Apr-04 14:56
monrobot1316-Apr-04 14:56 
QuestionReturning data using XML EXPLICIT in SQL2000 ??? Pin
mittalpa16-Apr-04 7:06
mittalpa16-Apr-04 7:06 
AnswerRe: Returning data using XML EXPLICIT in SQL2000 ??? Pin
Mike Dimmick16-Apr-04 10:23
Mike Dimmick16-Apr-04 10:23 
GeneralRe: Returning data using XML EXPLICIT in SQL2000 ??? Pin
mittalpa16-Apr-04 19:35
mittalpa16-Apr-04 19:35 
GeneralDuplicate a database Pin
OmegaSupreme16-Apr-04 4:51
OmegaSupreme16-Apr-04 4:51 
GeneralRe: Duplicate a database Pin
RichardGrimmer16-Apr-04 5:51
RichardGrimmer16-Apr-04 5:51 
GeneralRe: Duplicate a database Pin
OmegaSupreme16-Apr-04 6:18
OmegaSupreme16-Apr-04 6:18 
GeneralRe: Duplicate a database Pin
RichardGrimmer16-Apr-04 6:35
RichardGrimmer16-Apr-04 6:35 
GeneralRe: Duplicate a database Pin
OmegaSupreme16-Apr-04 7:55
OmegaSupreme16-Apr-04 7:55 
GeneralRe: Duplicate a database Pin
refugeees19-Apr-04 20:51
refugeees19-Apr-04 20:51 
GeneralDisplay records from Oracle Pin
bearOrangeToezz15-Apr-04 23:01
bearOrangeToezz15-Apr-04 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.