CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    Join Date
    Nov 2009
    Posts
    40

    couldn't lock file

    This error appears only on one user's computer. The application captures the message and displays it on the screen. I do not have such a message in the app. The application uses a local mdb and is an application client-server. It uses the mdb to get the names for some codes. The application works with some long routes (long list of station codes) and the error appears in these cases (route means a path between two railway locations). For the short routes it is working ok.

    Please help me to solve this problem!

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    Could you provide the exact message? Just use Ctrl+C/Ctrl+V or, at least take a screenshot.
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    Calipso error "Couldn't lock file"

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    Victor Nijegorodov

  5. #5
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    calipso is the name of my application - no connection with calypso. so the page does not respond to my problem.

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    Quote Originally Posted by florivucu View Post
    calipso is the name of my application - no connection with calypso. so the page does not respond to my problem.
    Can't you use google?
    Just remove your "calipso" from the search box!

    http://www.google.com/search?num=20&...=&oq=&gs_rfai=
    Victor Nijegorodov

  7. #7
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    I'm using google but there is no connection between calipso and calypso. "Calipso" is the name of my app. What appears under the link you gave me is not helping me.

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    Quote Originally Posted by florivucu View Post
    I'm using google but there is no connection between calipso and calypso. "Calipso" is the name of my app. What appears under the link you gave me is not helping me.
    The fact ypo are "using google" doesn't mean (unfortunately! ) that you can use it!
    Again: http://www.google.com/search?num=20&...=&oq=&gs_rfai=
    Victor Nijegorodov

  9. #9
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    Before posting this message on codeguru I searched the net for this error. The problem could be easily solved if the error appears all the time. But there are some path (routes) which do not give this error - they are working ok. Thank you very much for your replies but I could not solve the problem.
    Last edited by florivucu; July 12th, 2010 at 07:52 AM.

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    What is the difference in calculations for "long" and "short" routes?
    Victor Nijegorodov

  11. #11
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    The thing is I receive from the server a list of codes and to deliver it to the user I search the names in the mdb. From the time te user places the request and before I get to deliver the entire route I get the 'couldn't lock' file message. Even If I press Ok the route delivered is not complete so I can probably get into the mdb file to get some of the names but for some reason it stops.
    It's a local mdb file placed on the user's C: directory.
    If I request the same route from another computer it works out fine: same mdb (copy-pasted it)
    Most of my users don't get this error. It has appered so far on 3 of them.
    I checked the rights, I can move-it, delete it etc...

  12. #12
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    What is the "the user's C: directory"? Does you app have access to this directory (it is what http://support.microsoft.com/kb/306441 explains)?
    Victor Nijegorodov

  13. #13
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    I've read about this. The user logged in has full control to the directory where the mdb is placed. If I try to open the mdb manually I can even see the ldb file. When I open my application I can't see the ldb. I don't know how to grant rights to my application specifficaly but I think I would have this problem even for the smaller routes, not just the long ones (which is not the case).
    Last edited by florivucu; July 12th, 2010 at 05:06 AM.

  14. #14
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: couldn't lock file

    Quote Originally Posted by florivucu View Post
    ... I don't know how to grant rights to my application specifficaly but I think I would have this problem even for the smaller routes, not just the long ones (which is not the case).
    Then again:
    1. what is the difference in accessing database for "long" and "short" routes?
    2. what is the difference in accessing database in the "problem" PC and all the other ones?
    Victor Nijegorodov

  15. #15
    Join Date
    Nov 2009
    Posts
    40

    Re: couldn't lock file

    From my application there shouldn't be any difference.
    I load the codes from the txt the server gave, get the corresponding names using the mdb and print them onto the screen.
    I use:
    name=TUILibrary::Get_Name_Station(location);

    where Get_name_station is:
    long codes = atol(sta_code);
    CString sta;
    if (codes == 0)
    return "";
    CStatiiSet RstStatii;
    RstStatii.m_strFilter.Format("CODSTA = %ld",codes);
    if (!RstStatii.IsOpen())
    RstStatii.Open(dbOpenSnapshot);
    RstStatii.Requery();
    sta=RstStatii.m_DENSTA;
    RstStatii.Close();
    return sta;
    a longer route just means I call this function for over 100 different location codes
    Last edited by florivucu; July 12th, 2010 at 06:08 AM.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured