Thursday, June 02, 2005

Using Query Analyzer to manipulate data

Using Enterprise Manager to view and edit data directly while developing cf apps seems to be a common task. This can cause trouble in a group development environment. Enterprise Manager keeps a connection open while you display the contents of a table. This uses both server and network resources, while you may be off looking at code elsewhere. You can even lock a table so it can't be used by others or your application while you have it open. It's no fun coming back from a late lunch to 3 angry cube-mates who have had to spend their time defacing your picture in the company directory while they waited for you to unlock the "user" table.

There actually is a better way. Use Query Analyzer. You can right click on a table in the object browser and click "Open". The table opens and you can edit the information directly much like you can in enterprise manager without all the network and server traffic.

Plus, you can easily leave it open while you work in another window.

2 comments:

  1. Hello! I am a brasilian system analyzer, and would like to ask you for a help.

    I usually use Query Analyzer to edit tables, exactly as you said.

    But there is a table that does not allow edition. A simple "read-only" grid appears.

    A have created this table like all the others on my database, and I don't know why does this happen.

    Do you know? Can you help me?

    Thanks.

    ReplyDelete
  2. The first thing that comes to mind is that query analyzer can't identify which row you are trying to edit. Make sure that the table has a primary key and a unique index.

    ReplyDelete