.ldb file won't go away

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default .ldb file won't go away

    I'm accessing MS Access 2002 databases using CF on my website. I've never had
    a problem before with older pages and databases. I am now having issues with a
    new database and a new page. Every time I access the db and display data on my
    page I get a locking file that won't go away. I cannot FTP and overwrite this
    db while the locking file is there. I have simplified my page down to one line
    of of database access code using <cfoutput> but I still get the locking file
    that won't go away. My page code is attached below. Does anyone have any idea
    why the database would stay open? Thanks in advance.


    <cfquery name="CompList" datasource="Active">
    SELECT IDStatus FROM Active
    WHERE Company='#form.office#'
    </cfquery>

    <cfparam name="SerialNum" type="string" default="">
    <cfoutput query="CompList">
    <cfset SerialNum=#IDStatus#>
    </cfoutput>

    <cfquery name="Checklist" datasource=#SerialNum#>
    SELECT * FROM tblChecklist
    WHERE UserName='#form.username#' and Password='#form.pword#'
    </cfquery>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE>Online Closing Checklist</TITLE>

    <!--Script file for the menu bar-->
    <script type="text/javascript" language="JavaScript1.2"
    src="../js/apymenu.js"></script>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta NAME="keywords" CONTENT="">
    <meta NAME="description" content="Online Closing Checklist from ProDocs">

    <link rel="stylesheet" href="ProDocsCSS.css" type="text/css">

    </HEAD>

    <BODY>

    <table width="700" align="center"><tr><td>

    <cfif #checklist.recordcount# IS NOT 0>
    <table width="100%">
    <tr>
    <td width="100%">
    <b>Office:</b>&nbsp;&nbsp;<font class="blue">
    <cfoutput query="Checklist">#ClearToClose#</cfoutput>
    </font><br>
    </td>
    </tr>
    </table>
    </cfif>

    </td></tr></table>

    </BODY>
    </HTML>

    BennyLefave Guest

  2. Similar Questions and Discussions

    1. problem in binding xml file data to datagrid xml file isgenerated through JSP file
      problem it that i am creating xml file using JSP file and i want to bind DataGrid with xml file data that is created using JSP but it will not Bind...
    2. File Viewer / Bloated file sizes / What is the best file format?
      I would like to find a viewer capable of looking at the main Adobe formats as well as the standard formats such as JPG and WMF ... but yet the only...
    3. Open file, make changes, save file, close, re-open, file contents not changed
      I've now run into this several times and it's completely destroyed all of my confidence in Ilustrator CS on Mac. I'm hoping someone can confirm that...
    4. [BUG] File#rewind, File#syswrite, File#pos on Cygwin build
      On the cygwin build of ruby v1.8.0, I have encountered a strange bug when using rewind, syswrite and pos. If you open a file in read/write mode,...
    5. Confused about locking a file via file.flock(File::LOCK_EX)
      I am writing a ruby appl under AIX where I need to update the /etc/hosts table. I would like to make sure that during my update nobody else can...
  3. #2

    Default Re: .ldb file won't go away

    ..ldb is created by access
    everytime you open a access database it create a filename.ldb and it will go
    away when you close the access database

    first you will have to make the .mdb file inactive via cfadmin then ldb file
    will go away

    if you have a choice i would recomend to move from access to MYsql or if you
    have the money to MSsql

    hope it helps



    jorgepino Guest

  4. #3

    Default Re: .ldb file won't go away

    Check your DNS properties in the CF administrator and make sure that the "maintain database connection" option is unchecked.


    Dan Phillips
    CFXHosting.com
    dphillipsCFX Guest

  5. #4

    Default Re: .ldb file won't go away

    Thanks for the reply.

    I don't have access to the coldfusion administrator as our site is hosted by
    Ready Hosting and they do all the administration. I only use the CF Admin for
    testing local db's.

    I don't understand why my other databases do not stay open after accessing
    them and this new one does. There is no difference between the the new one and
    the old ones as format is concerned and the code to access them is basically
    the same. I contacted Ready Hosting and they said that something I am doing is
    keeping the db open. Any help would be greatly appreciated.

    BennyLefave Guest

  6. #5

    Default Re: .ldb file won't go away

    Did you ask your host about the "maintain database connection" setting mentioned by dphillipsCFX above?
    mxstu Guest

  7. #6

    Default Re: .ldb file won't go away

    Hi Benny,
    >Every time I access the db and display
    >data on my page I get a locking file that
    >won't go away.
    If you send a junk query to the Access database, i.e. a query that will
    throw an error, it should get rid of the .ldb file and allow you to FTP and
    overwrite the database. However that .ldb file will get recreated the next
    time you access the database. MS Access is not really a good choice for a
    variety of reasons. If you have the option of using a true CS database, that
    would be a better choice.

    Regards,
    Roy F.



    "BennyLefave" <webforumsuser@macromedia.com> wrote in message
    news:dgprnk$if$1@forums.macromedia.com...
    > I'm accessing MS Access 2002 databases using CF on my website. I've never
    > had
    > a problem before with older pages and databases. I am now having issues
    > with a
    > new database and a new page. Every time I access the db and display data
    > on my
    > page I get a locking file that won't go away. I cannot FTP and overwrite
    > this
    > db while the locking file is there. I have simplified my page down to one
    > line
    > of of database access code using <cfoutput> but I still get the locking
    > file
    > that won't go away. My page code is attached below. Does anyone have any
    > idea
    > why the database would stay open? Thanks in advance.
    >
    >
    > <cfquery name="CompList" datasource="Active">
    > SELECT IDStatus FROM Active
    > WHERE Company='#form.office#'
    > </cfquery>
    >
    > <cfparam name="SerialNum" type="string" default="">
    > <cfoutput query="CompList">
    > <cfset SerialNum=#IDStatus#>
    > </cfoutput>
    >
    > <cfquery name="Checklist" datasource=#SerialNum#>
    > SELECT * FROM tblChecklist
    > WHERE UserName='#form.username#' and Password='#form.pword#'
    > </cfquery>
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <HTML>
    > <HEAD>
    > <TITLE>Online Closing Checklist</TITLE>
    >
    > <!--Script file for the menu bar-->
    > <script type="text/javascript" language="JavaScript1.2"
    > src="../js/apymenu.js"></script>
    >
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > <meta NAME="keywords" CONTENT="">
    > <meta NAME="description" content="Online Closing Checklist from ProDocs">
    >
    > <link rel="stylesheet" href="ProDocsCSS.css" type="text/css">
    >
    > </HEAD>
    >
    > <BODY>
    >
    > <table width="700" align="center"><tr><td>
    >
    > <cfif #checklist.recordcount# IS NOT 0>
    > <table width="100%">
    > <tr>
    > <td width="100%">
    > <b>Office:</b>&nbsp;&nbsp;<font class="blue">
    > <cfoutput query="Checklist">#ClearToClose#</cfoutput>
    > </font><br>
    > </td>
    > </tr>
    > </table>
    > </cfif>
    >
    > </td></tr></table>
    >
    > </BODY>
    > </HTML>
    >

    Roy F. Guest

  8. #7

    Default Re: .ldb file won't go away

    OR are you storing client variables in that DB? CFMX will keep the .ldb
    file open even if the "maintain database connection" is unchecked

    HTH
    --
    Tim Carley
    [url]www.recfusion.com[/url]
    [email]info@NOSPAMINGrecfusion.com[/email]
    Mountain Lover Guest

  9. #8

    Default Re: .ldb file won't go away

    My web host has to be the problem. When I run the site locally and query the
    db's I get no locking file. I contacted Ready Hosting and they said it's an
    Access problem, so they're basically not trying to help and telling me to go
    talk to Microsoft....No thanks. I told them to check their OBDC settings for
    the "Maintain Connection" option on all new DSN connections that are created.
    Still waiting to hear back. Thanks for all the replies everyone.

    BennyLefave Guest

  10. #9

    Default Re: .ldb file won't go away

    UPDATE: Ready Hosting says they "Maintain Connections" checkbox is clear, and is off by default for new DSN connections. This is driving me nutty!!!!!!!!!! I don't know what else to do.
    BennyLefave Guest

  11. #10

    Default Re: .ldb file won't go away

    Hi Benny,
    > UPDATE:........
    Did you try the junk query I suggested? Put the following query on it's
    own page on on your server and pull up that page. Substitute the
    #request.dsn# for whatever your data source is.

    <cfquery NAME="baddata" DATASOURCE="#request.dsn#">
    Select BadData FROM UnknownTable
    </cfquery>

    This should get rid of the ldb file.

    Regards,
    Roy F.

    BennyLefave wrote:
    > UPDATE: Ready Hosting says they "Maintain Connections" checkbox is clear, and is off by default for new DSN connections. This is driving me nutty!!!!!!!!!! I don't know what else to do.
    Roy F Guest

  12. #11

    Default Re: .ldb file won't go away

    Roy,

    We are having the same problem. Could you explain your solution a bit more? Is there a way to create a bogus query from the Query Builder as I am not a programer?

    Thanks,
    SKK

    EssKayKay Guest

  13. #12

    Default Re: .ldb file won't go away

    Hi SKK,
    >Could you explain your solution a bit more?
    I wouldn't call it a solution, more like a workaround. There's not much
    more to explain. For whatever reason when you send a bogus query to the
    access database the error causes the lock file to be deleted. The
    solution to the problem is to not use Access as your database.
    >Is there a way to create a bogus query from the
    >Query Builder as I am not a programer?
    Really all you have to do is use the exact same query I gave in my last
    post, replace the dsn with yours, put it in it's own cfm page on your
    server, and then go to that page in your browsers like you would go to
    any other page. That's all you need to do. The query will error out and
    you'll find the ldb file is gone. Hope this helps.

    Roy F.

    EssKayKay wrote:
    > Roy,
    >
    > We are having the same problem. Could you explain your solution a bit more? Is there a way to create a bogus query from the Query Builder as I am not a programer?
    >
    > Thanks,
    > SKK
    >
    Roy F Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139