Hey I have work with c# and Sql server for awhile but never had to build anything from start-up. I created a database with basic stored procedure. insert, update, and delete basic stuff.
ok.. here we go.
tb1
pid int indentity (1,1) pk
projectname
tb2
sid int indentity (1,1) pk
pid int fk
systemnumbers
tb3
cid int indentity (1,1) pk
pid int fk
sid int fk
cname
caddress
ccity
cstate
czip
I have a problem with duplicate records on these two tables tb1 and tb2. These tables are the system number and project name. Every web form has two drop down list that is populate with data from tb1 = projectnames and tb2 = systemnumber.
When they click the save button the data is save but, tb1 has a new entry with duplicate projectname and tb2 has a duplicate with systemnumber each receives a new pk number.
I tried validation check if exist get error can't modified existing pk.
or doesn't save.
I have pk and fk on each table connected to tb1 and tb2.
any help any one can give is appreciated.
If I can get example code a link to reference(any thing) :( :confused: :((
So if I have a data in tb1 pid 1 projectname bike.
On the form when you enter a new client with the tb1 as ddl projectname bike which connects them to the bike project. It saves the data yet, when I refresh the ddl bike is listed twice with a new pid number of 2. When I repeat bike is on the ddl list a third time with pid number 3 and so on.
This is happen with tb2 as well.
I hoping this is a better explanation to my problem.
Thanks alot for your help.