DblPrimaryKey on SQL to match Access?

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default DblPrimaryKey on SQL to match Access?

    Is it possilble or advisable to implement a double primary key on an sql
    server table to match an Access Table....

    As I understand it, I could create a 2 "Int" datatypes on the two fields
    with "Primary" and Seed enabled....

    Thanks
    Jason


    Guest

  2. Similar Questions and Discussions

    1. Can't access font style to match rest of page
      Hello: I'm trying to create text in a table next to an image. The text on the page is Arial 10, Style: Normal. But when I add new text it...
    2. Query to match date -- ODBD -- Access database
      I am running CF5, and using ODBC to query an Access 2002 database. I think these are the parts of my program that illustrate the problem: <cfset...
    3. Why is this not a match?
      Hello All, I am unable to find out why is this not matching: I do have a file where the second line contains: Summary Log (generated: Tue...
    4. pattern match
      Where can I find infi or doc on "pattern match" used within WHERE clause (mysql). As I need to matche with PHP variables I'd prfer something...
    5. [PHP] trying to match the front and end...
      On 08 August 2003 15:39, Dan Joseph wrote: $middlenum = preg_replace("/^${this->start_num}(.*)${this->end_num}$/", '$1', $this->ach_acct_num); ...
  3. #2

    Default Re: DblPrimaryKey on SQL to match Access?

    Hold on...it appears I can highlight the two fields simultaneously and
    insitute a double-primary key to match the access table...will do unless
    tells me this is a dangerous path.

    Thanks
    Jason
    <jason@catamaranco.com> wrote in message
    news:OohmEDadEHA.212@TK2MSFTNGP12.phx.gbl...
    > Is it possilble or advisable to implement a double primary key on an sql
    > server table to match an Access Table....
    >
    > As I understand it, I could create a 2 "Int" datatypes on the two fields
    > with "Primary" and Seed enabled....
    >
    > Thanks
    > Jason
    >
    >

    Guest

  4. #3

    Default Re: DblPrimaryKey on SQL to match Access?

    > As I understand it, I could create a 2 "Int" datatypes on the two fields
    > with "Primary" and Seed enabled....
    You want two separate autonumber columns? Why?

    Anyway, yes, you can create a primary key in SQL Server with multiple
    columns.

    CREATE TABLE dbo.OrderDetails
    (
    OrderNumber INT, -- FK
    ProductID INT, -- FK
    -- other columns, e.g. quantity --
    PRIMARY KEY(OrderNumber, ProductID)
    )

    I strongly recommend learning the technology rather than poking around the
    wizards and guis and stumbling across things that just happen to work.

    --
    [url]http://www.aspfaq.com/[/url]
    (Reverse address to reply.)


    Aaron [SQL Server MVP] Guest

  5. #4

    Default Re: DblPrimaryKey on SQL to match Access?

    Actually, I miscued...I needed two 'primary' key columns based on a previous
    access table....I used the GUI to create this double-key....but I see now
    that experienced programmers
    are creating the SPs and tables on the fly as you have done below....

    At the moment I am just trying to get an existing access application running
    on sql server....I don't have the time to do indepth analysis...I plan to
    adjust the data types
    where necessary and convert one query into an SP and then adjust my .ASP
    scripts to correctly call the SP and interrogat the converted tables...

    Thanks
    Jason
    "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
    news:%23kCx4jadEHA.3916@TK2MSFTNGP11.phx.gbl...
    > > As I understand it, I could create a 2 "Int" datatypes on the two fields
    > > with "Primary" and Seed enabled....
    >
    > You want two separate autonumber columns? Why?
    >
    > Anyway, yes, you can create a primary key in SQL Server with multiple
    > columns.
    >
    > CREATE TABLE dbo.OrderDetails
    > (
    > OrderNumber INT, -- FK
    > ProductID INT, -- FK
    > -- other columns, e.g. quantity --
    > PRIMARY KEY(OrderNumber, ProductID)
    > )
    >
    > I strongly recommend learning the technology rather than poking around the
    > wizards and guis and stumbling across things that just happen to work.
    >
    > --
    > [url]http://www.aspfaq.com/[/url]
    > (Reverse address to reply.)
    >
    >

    Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139