![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi there, I am relatively new to SQL Server so do forgive me if i seem a tad nieve. I have recently upsized an Access 97 DB to SQL server 7, simply to implement an ASP application on the same data that is in the Access DB ( had to be in SQL, not direct on Acces db). The data is still input and manipulated into Access and exported to .csv files every month, then imported into the SQL DB. So the ASP pages are kept up to date. The problem i am having is as follows. For some reason i was under the impression that SQL tables HAD to have a primary key field in order to be read/write. Not sure where i heard that from. Due to the bad design of the Access database (not on my part, it wasnt me) alot of the tables are not indexed nor have primary keys. So, upon creating the Sql tables i added a field called SQL_REF simply as a unique identifier (autonumber, or identity increment in SQL) PK field. Now when i run my DTS imports on some of these tables it states you cannot insert a NULL value into a primary key field or the like (as allow Null values is unticked for pk's) 1st id like to know whether it is entirely neccessary for me to have PKs in the SQL tables, as all they are used for is running Views to get data onto ASP pages. And second, short of deleting the PK field, how can i stop this error appearing? the SQL_REF pk field is entirely uneccessary, simply is there because i was told SQL tables HAD to have some sort of unique identifier. Thanks for your patience Kind Regards -- G www.bradflack.com Please remove ANTI and SPAM from my email address before sending me an email. |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |