Thread: db program access GetFieldValue

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    164

    db program access GetFieldValue

    Hi, I have been doing minor db programing for about a year, and ran into some strange results off of some joint table queries from the same db.

    The querie itself is fine, its the output that fails to meet the criteria I am looking for. I think my querie is ok, but the way I am requesting the output seems have conflicts because two of three tables I join have the same column headings I am requesting. Is there anyway using GetFieldValue to clarify the table and column to prevent this. Below is some code to show what I mean.

    Code:
    rec.GetFieldValue("ship_label_id", shipLabel);
    				fout<<shipLabel<<"\t";
    				rec.GetFieldValue("actual_weight", actualWeight);
    				fout<<actualWeight<<"\t";
    				rec.GetFieldValue("user_id", employee);
    				fout<<employee<<"\t";
    				rec.GetFieldValue("status", status);
    				//translate the status for user in reporting
    				if ((strcmp(status, statzero)==0))
    				{
    					fout<<"Not Picked"<<endl;
    				}
    				if ((strcmp(status, statone)==0))
    				{
    					fout<<"Picked"<<endl;
    				}
    				if ((strcmp(status, statthree)==0))
    				{
    					fout<<"Short"<<endl;
    				} 
    				rec.GetFieldValue("status", cstat);
    				//translate the status for user in reporting
    Any help in understanding this is greatly appreciated. Thanks-

  2. #2
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    let's see your query, you would specify that in the query not in the code to read the response.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    164
    sorry for the late response, my query is below, however, when I plug the query into access, I get the response I am looking for, I truly believe this is how I am calling for the results within the getfieldvalue, however, I've been wrong before, many times before, so any help is always appreciated.

    query:
    Code:
    SELECT [Order].[store_nbr], [Order].[misc_field_4], [Order].[ship_route], [Orderl].[order_seq], [Carton].[tracking_id], [Orderl].[misc_field_5], [Orderl].[slot_name], [Orderl].[freight_class], [Orderl].[q_ordered], [Orderl].[inner_pack], [Orderl].[q_picked], [Orderl].[cust_sku_desc], [Orderl].[ship_label_id], [Carton].[actual_weight], [Orderl].[user_id], [Orderl].[status], [Carton].[status] FROM [Order], [Orderl], [Carton] WHERE (([Order].[order_seq] = [Orderl].[order_seq]) AND ([Orderl].[ship_label_id] = [Carton].[ship_label_id]) AND ([Order].[store_nbr] = 70));

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Access HTML from a program.
    By azjherben in forum Networking/Device Communication
    Replies: 13
    Last Post: 06-05-2009, 02:55 PM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 03:30 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Date program starts DOS's date
    By jrahhali in forum C++ Programming
    Replies: 1
    Last Post: 11-24-2003, 05:23 PM
  5. Replies: 2
    Last Post: 05-10-2002, 04:16 PM