Results 1 to 14 of 14
  1. #1
    Join Date
    May 2014
    Posts
    7

    Unanswered: Can we Create Compsite Primary fields in Brillant Database ? Plz share

    Can we Create Composite Primary Key In Brillant Database ? Plz share

  2. #2
    Join Date
    May 2014
    Posts
    7

    Can we Create two ot three fields as Primary Composite key in Brillant Database ? Any

    Can we Create two or three fields as Primary Composite key in Brillant Database ? Any Know plz share............

  3. #3
    Join Date
    Apr 2013
    Posts
    226
    There is no facility in BD to define Primary Keys, composite or not. And the relationships are not set up by explicitly linking a primary key to a foreign key as you might in another DBMS. What are you trying to achieve?

  4. #4
    Join Date
    May 2014
    Posts
    7

    I need two Primary Fields ( Compsite)

    i have two fields:
    Genreal Number :
    Year :
    i need both to be primary composite key
    For example -1 Entry
    If General number: 123
    Year :2013
    -2 Entry
    General number :123
    Year: 2014

    If Next Time i Enter
    General Number :123
    Year: 2014

    THere should be msg box out Already exist .....I am New To Brillant Database.Plz Share iF you Know .....Thanks

  5. #5
    Join Date
    May 2014
    Posts
    7

    Any script is there to define two fileds Duplicate already exist

    Any script is there to define two fileds should not be Duplicate
    messagebox out already exist Data..............

    I need 1 more help Can we Find By exact Field Name Data in above example here i have 1 to 1500 Entries of general number of year 2013 and 1 to 1700 entries of year 2014
    when i used Find General =10 (it found 290 entries for both 2014 and 2013)

    Any Good Examples Plz Shares .........

  6. #6
    Join Date
    Apr 2013
    Posts
    226
    That should be fairly easy to do. One way would be to have a hidden field that was a concatenation of the two fields. Then you could have an on-edit script for both of the fields that would check the hidden field on all existing records to see if that combination was unique. If not it would throw up a message box.

  7. #7
    Join Date
    May 2014
    Posts
    7

    Is there any thing in BD to concatenate two fileds ?

    Is there any thing in BD to concatenate two fileds ?
    u are saying the right thing
    if u have done this , plz share the database Example....
    Thanks Matty

  8. #8
    Join Date
    Apr 2013
    Posts
    226
    Hi,

    You need to script it. See attached database. I have a form with two text fields (Field1 and Field2) and a third field (Field1Field2) which will hold the concatenation of the other two fields. I have an "on edit" script set for each field that uses the Action: Set Field Value (text). This is the script:

    [Field1Field2] = "[Field1][Field2]"

    Hope that helps.

    Matty
    Attached Files Attached Files

  9. #9
    Join Date
    May 2014
    Posts
    7

    Great Dude !!!!

    Great Matty , this thing help me alot ..
    now how create messagebox out that This field is already exist......
    and one more thing require , how i find by exact Field value for require database,
    Here i have field which contain 1 to 3000 numbers serial wise
    when i serach the folder by number it gives 300 search values for it....

  10. #10
    Join Date
    Apr 2013
    Posts
    226
    Hi,

    I've given you a start ... you need to look into scripting.

    From a script you can run a query to search records for a field value. If the number of records returned by the query is not equal to zero then you know the field exists and can then display the message box. You would also need to clear what the user had entered to enforce it.

    Matty
    Last edited by matty1965; 05-24-14 at 08:21.

  11. #11
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Amritsar
    You may not need a composite field if you just need to check if a 2 field combination is unique. Running a "and" query with a little scripting should warn you if there are multiple enteries. You could try the following.
    Set 2 text variables to each field and use these in a "and" query searching on same fields. Have a IF EndIf check records returned by query and if more then 1 show message etc. Run this script after editing second field. Real application needs refining but this is general idea.
    Regards
    David

  12. #12
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    I've attached an updated version of the file Matty has written.

    This one runs a query silently in the background that checks two variables. If a duplicated record is found, the value you entered will be cleared and a warning message will be displayed notifying the operator.

    Regards
    James
    Attached Files Attached Files

  13. #13
    Join Date
    May 2014
    Posts
    7

    Thanks Dude , This help Alot To proceed >>

    Thanks Dude , This Thing Help Alot To understand Query Logics In BD Software .

  14. #14
    Join Date
    Sep 2012
    Posts
    21
    Thanks for James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •