IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Damsel in distress!
Got this question from another forum:

Do we have any experts around here on ASP and Access databases? I took a class a while ago, so I thought I knew what I was doing, but of course as soon as I tried to actually apply all this exciting new knowledge, nothing works and I have no idea what else to try.

I'm connected to the db, and I can query it just fine, but it won't let me insert new records. The problem seems to be that an .ldb file is being created and locking the database each time I submit my form, and then it just stays there until I go in and delete it. If I see "500 - Internal Server Error" one more time, I think I'm going to scream.
New I assume a repair has been done?
Have heard of older versions of Access (97 i think) that would get the database in a funk, and you'd have to recreate the database over again.

If you assume that it's a programmer problem, then you'd have to look and see what program was locking the records and not committing or rolling back the transactions. In the worst case, a program that causes access to lock up, may be the source of the locks.
New Dunno. But I have an update.
The .ldb file is not being deleted when she closes. ANd she got this message from a tech support person:

"I have looked into your in accordance with the log database files it is telling me that you are not closing your record set and connection object. Please review this code this is where the problem lies."


Something is not closing the ODBC connection apparently. That doesn't explain the lack of ability to add records though.
New Depends on the kind of a lock
Some transactions require the whole table to be locked for update. That is, you don't want to have the set change on you in the middle of the read - unless you want dirty reads.
New That 'something' is the developer.
Explicitly close connections instead of letting them just fall out of scope. Goes double when errors are raised.
New Need more detail
That isn't enough information to really figure out what the problem is. Between IIS and Access there are just too many things that might be going wrong. The first thing I would like to see is the ASP code this person is trying to run.

One possibility is that they are using a recordset.AddNew to create the new record and need to put a recordset.Update to finish the transaction. I know this can trick people because depending on how you use AddNew it may or may not need an Update afterwards. It seems likely to me because it would cause the page to open a transaction for the AddNew and never close it, which I think would cause exactly the problem they report.

Jay
New That'd be my guess and GACK.
People actually use recordset.Addnew instead of "insert into ..." Gack!

(Yes, I know set cmd = new adodb.command, cmd.commandtype = adCmdStoredProc, cmd.createparameter, yadda, yadda, yadda, is the *proper* way of doing things ;-)
bcnu,
Mikem

I don't do third world languages. So no, I don't do Java.
New You'd be suprised
I think you would be surprised just how much of that crud there is. I know a lot of people jumped from doing Access applications to coding ASP VB Script during the Internet boom, without really considering how the platforms are different.

This produced some of the worst code I have ever seen. Code that was both nearly unreadable and performed horribly, running web sites that where tied to various IE extensions and depended on IE HTML bugs to display correctly.

There where several cases where I fixed performance problems in our application by doing nothing but throw out unneccisary temp tables. People too used to using Access's ability to base a query on query would do the same thing in SQL by dumping the result of one query into a temp table then doing a query on the temp table that dumped it's result in another temp table and so on.

I ran across one git that used Word's export to HTML function to do his basic page layout and then hacked up the Word output with bad recordset code to create an intranet application.

Jay
New I've seen some of the very same stuff.
And worse, believe it or not. Like a VP of Information Technology actually insisting that static web content that displays graphs be done with MS Excel.
bcnu,
Mikem

I don't do third world languages. So no, I don't do Java.
New Re: Need more detail
She's going to look into this one. I told her to come over and register and post if she still can't figure it out, so be nice.
New Does filesystem say .mdb file is writeable for all users?
New Re: Damsel in distress!
Don't use Access for non-local databases.
qts
     Damsel in distress! - (acagle) - (11)
         I assume a repair has been done? - (ChrisR) - (3)
             Dunno. But I have an update. - (acagle) - (2)
                 Depends on the kind of a lock - (ChrisR)
                 That 'something' is the developer. - (FuManChu)
         Need more detail - (JayMehaffey) - (4)
             That'd be my guess and GACK. - (mmoffitt) - (2)
                 You'd be suprised - (JayMehaffey) - (1)
                     I've seen some of the very same stuff. - (mmoffitt)
             Re: Need more detail - (acagle)
         Does filesystem say .mdb file is writeable for all users? -NT - (bbronson)
         Re: Damsel in distress! - (qstephens)

And that's not all!
109 ms