deleting records from imported table

  • novice sql user

    I've imported an access table into an sql databse I would like to delete a couple of records from this table unforfunatly highlighting the record and right clicking gives a greyed out delete function. this only appears to affect imported tables, ant help would be gratefully recieved

    running winxp and access 2003

    with just sql client tools and sql server manager on a local machine

  • Are you using Access to delete the data?

    If you are using linked tables within Access, you must ensure that Access knows the primary key of the table when you link it - you may get a screen flashing up asking you to identify the primary key - do not ignore it.

    Once Access knows the correct primary key, your delete option should be available to you again.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • as far as i am aware the tables are not linked, they are in the origional access project db that was set up from an sql db backup

  • Make sure you have rights to delete in SQL for the table you are looking at.  If you are looking at the table through Access, then you need to look at the connection Access is using to SQL.

     

    dtooker

  • Most likely when you brought the data into SQL Server it was without the primary keys.  You MUST have a primary key in SQL Server to edit data.  It is much more strict about some issues as Access.  This has happened to me a few times and, until I figured it out, drove me nuts.

    This is written on the assumption that you migrated the data to SQL Server and want to edit the data in SQL Server.

  • Yes I want to edit the data in SQL, excues my ignorance but how do ypu ensure that the Primary key is brought over from access, I am bringing a complete table over

  • Go into the table design using Enterprise Manager and set it.  Otherwise, create a new Access Project (with existing data) and use the Access front-end to do the same thing.  Select the primary key you want to set and click the key icon.

    When you use the upsizing wizard in Access, you may be able to select the 'table relationships' to get the key but mostly I've merely set it in the design.

  • many thanks problem sorted

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply