NetTalk Central

Author Topic: Unique Key Is Customer Number - Can't Access  (Read 3707 times)

zdpl0a

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Unique Key Is Customer Number - Can't Access
« on: October 15, 2010, 08:11:06 AM »
Hi All,

This used to work. I compiled under PR32 today and it does not.
3 Tables
Orders
Customers
CustomerContacts

Orders has a filed for the ID for the Customer table and the Contact Table.

The unique key, auton umber, in the customer table is also the customer number. Over 700 customers in the table.  Clarion 6 apps work fine.

The customer is obtained using a select table.  The customer number is placed in a session var

When the contact Table is called, the session var, placed in a local variable is used to filter so only the contacts for the selected customer are visibile to be select.

So, the user selects a customer, then selects a contact from 2 different forms.
Worked great


Now
The slections of the customer is returning a zero instead of the proper customer number from the ufield whic is also part of the unique key for the table.  I can display any other field from the customer table on the server, be they long, or string.

Funny thing is the customer number does return from the select lookup and is placed in the field on the orders record as well as showing the customer name in the comments field... I just can no longer access it like before and save it for use in another lookup.














Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Unique Key Is Customer Number - Can't Access
« Reply #1 on: October 15, 2010, 09:45:50 AM »
I'm not sure I understand the setup you have, but your bit about
"part of the unique key" is interesting.
Is your unique key a multi-component key? At the moment only single-component keys are supported.

Perhaps a good idea would be to make a small app & dict example of what you have and post it here so it's easier to follow your description.

Also are you doing a popup-lookup or a page-lookup?

cheers
Bruce

zdpl0a

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Re: Unique Key Is Customer Number - Can't Access
« Reply #2 on: October 15, 2010, 11:29:36 AM »
Bruce

Orders File - Primary unique key is single field, record no. 

Customer File - Unique primary key, single field, Customer Number

Contacts File - Unique Key - Single field, RecordNumber, Key used for this - Customer No, COntacnt NO - Contact NO is auto Increment and customer no is filled from the customer parent

I have a form I do the selection of the customer number from.  WHen it returns it DOES place the customer no in the field on the orders record and pulls the customer description and places it in the comments field.  However, the setseession variable value is zero (it used to work).

When I place message statements after the return from the selection form, I can display every field in the Customer record upon the server except the customer number, which is the only field in the unique key.