Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can not enter new record to ADP

Status
Not open for further replies.

Aliffi

MIS
Jan 9, 2005
51
BE
Dear All !
i have a back SQL SERVER and front ADP. now the problem is that i can not enter new record in my tables, with out primary key , but i dont need to have a primary key in my table in this case , what can i do to make the table active for entry, remember i dont need to set primary key in my table. help plz
 
Why do you want a table without a primary key? I can't think of a reason. I doubt if a bound form will not require a primary key.
 
Dear CMMRFRDS thanks for reply , but my point is that when i set primary key then i cant enter duplicate records ... i need to enter duplications but how can i enter record in ADP table or form without setting a primary key.
if i set primary key i cant have duplicate values
if i dont set primary key i cant enter records

regards
need urgent reply
 
You can't update a SQL Server table through an ADP form without having a primary key unless you write a lot of code to do it.

It is not good to use columns that have any meaning as a primary key (don't use something like client name as your primary key). It is much better practice to use a column that serves no other purpose than being the record key (you could call it something like RecordID). Then you can choose if you want to allow duplicate data records (excluding the primary key column) through constraints or indexes.
 
Aliffi, please do as cjowsey suggests. You will find with experience that you do want a non-intelligent primary key. Most likely an identity field that is self incrementing. Look up identity attribute on a column definition in sql server.
 
Thanks guys i have done what cjowsey said ....and it really worked i got a new column Project_ID and the data type was identity self increament ....and having primary key now it is working
thanks alot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top