primary key

  1. E

    Question primary key, how to generate custom value

    hi there, i have a SQL SERVER 2008 table with 3 columns(P_ID(Primary key), PRODUCT_NAME, DESCRIPTION), now, how can i generate a custom and unique(ofcourse) value for my primary key, for example: sc00001 in the 1st row, and when i enter another data it will generate sc00002 something like that...
  2. R

    Question How to set DataSet Primary Key programmatically

    I need some help here. I have a form that populates two tables (countries and states). Country Primary key is Identity. State PK is Country PK + state PK (not identity and entered by the user) I want one form to allow the user to add or modify countries and states. My form has a textbox, a...
  3. N

    Question Saving Datagridview multiple rows under one Composite key.

    Hi i am developing a program to a Computer shop. In my main form there are few textboxes to enter the customer details (EX: INVOICE NO, CUSTOMER NAME ,BILL TO, ETC)and i have separate table named "Customer". And also in the main form there is a datagridview to enter the Products that the...
  4. D

    Question Form Addnew -> primary key -1?

    I've created an overview form witrh a list of customers. When the user wants to add a new customer, i use the addnew() function. In the "add" screen an empty card is shown to be filled in by the user. When entering the new data, the primary key (auto number) stays -1? I thought it would change...
  5. C

    Oracle Primary Key Question

    I am having some difficulty coming up with a clean design for inserting new records into an oracle database using VS 2008, Datasets and the TableAdapterManager. The Primary Key of the Oracle table is ID and is defined as a number. My original intention was to create a Before Insert trigger...