Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Adding one record to a table - db hangs!

Author  Topic 

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-21 : 18:39:21
I have an Access front end, that gives a user the opportunity to add a record. It is a single record that gets added. Occasionally, for reasons I can't figure out, the database just hangs, and won't insert the record. I have gone to the SQL 2000 database, and tried to add it, and it will hang there too. There are no similarities between the records it hangs on. For example, I am trying to add "Republic of Zambia", which hangs up, but if I enter "Republic of Ireland" it works fine. There are no special characters or other obvious things that spring to mind.
Anybody got any clue as to why it occasionally hangs?

Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-21 : 18:41:30
Are you starting a transaction and then not committing it?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-21 : 18:48:14
In the Access form, its a simple acCmdSaveRecord. I have gone to Query Analyzer, and tried a basic Insert into statement, which also hangs - but only on this particular name.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-21 : 18:49:27
In Query Analyzer, check if anything is blocking you by running sp_who and sp_who2 from a new window.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-21 : 18:52:33
There are no blocks. I can't figure out why one record will freeze but another one won't! Its not the first time its happened, it comes up on a more and more frequent basis, so I would love to find out whats causing it!!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-21 : 18:54:59
You need to check for blocking while it is hanging in the other Query Analyzer session.

Could you post your query that you tried in Query Analyzer?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-21 : 18:58:56
I have checked for blocks when it hangs, and nothing ever shows up. Running the following hangs:

Insert into tblOrganizations(orgname,acronym)
Values ('Republic of Zambia', NULL)

But running
Insert into tblOrganizations(orgname,acronym)
Values ('Republic of Ireland', NULL)



Go to Top of Page

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-21 : 19:00:42
Oops - I didn't finish that post! The second one works fine. Any other value that I care to put into the insert statement seems to work - just not one particular one!!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-21 : 19:31:59
Run DBCC CHECKTABLE against it to see if there is any data corruption.

By the way, you can edit your posts using the pencil icon in that particular post rather than posting new ones.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-24 : 13:22:36
I tried this morning, and it worked fine. It makes no sense to me - I can't find anything wrong - just occasionally a record hangs the database.
Go to Top of Page

mfemenel
Professor Frink

1421 Posts

Posted - 2008-03-24 : 14:17:27
Any triggers on the table that might be hiding the issue?


Mike
"oh, that monkey is going to pay"
Go to Top of Page

bmahony993
Yak Posting Veteran

58 Posts

Posted - 2008-03-27 : 18:47:20
Nope, no triggers either!
Go to Top of Page

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2008-03-28 : 08:41:59
Let me take a guess.

You installed service pack 3 for MS office.

It has some bugs in it that cause this to happen.

Also if you have check boxes on a form it will set them all to true if you create a new record.

Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -