Results 1 to 2 of 2

Thread: SQL Statement With ACCESS Relationship

  1. #1
    Join Date
    Jun 2003
    Posts
    17

    Unhappy SQL Statement With ACCESS Relationship

    Hello Members, I am currently having problem in relationship table coding. Ok this is how my Database it is:

    FirstDB(ID,UserID,FirstName,LastName,Title,Nick)
    SecondDB(ID,Company,Address,City)

    That is sample of DB. The ID column is AUTONUMBER FIELD type. So The FirstDB --> ID is our Primary Key and SecondDB --> ID is our Foreign Key which is LONG INTEGER FIELD type. The Both Primary and Foreign Key are already set Enforce Referential Integrity. Ok now I am going to add new data to UserID,FirstName,LastName,Title,and Nick column. So I use like this :

    Set rs = Conn.Execute(“INSERT INTO FirstDB(UserID,FirstName,LastName,Title,Nick) VALUES (‘mugun’,’xmen’,’two’,’Mr’,’Xmen ’)”)

    The above statement already adds our new data to FirstDB Table. But what I want it is, I am going to add more info about Company, Address and City based on that contact in SecondDB Table. How should I can do that? Please guide me as soon as possible. Thanx In Advanced.

    -mugun

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    1. are you using ASP-db product.
    2. are you referring to edit multiple tables - if yes then there are examples to show how to do that. Look around or contact support to locate them.

    FK

Posting Permissions

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