Update to this if any one is interested. The setMSAccessUnicode() function 
requires a "pooling" argument instead of a "maintainconnect" argument. As 
soon as I added pooling = 0 instead of maintainconnect = 0 the problem was 
solved.

Of cource this is not listed on the documentation anywhere that I could see 
.... thanks for all the help guys.

----- Original Message ----- 
From: "Rod Higgins" <[EMAIL PROTECTED]>
To: <cfaussie@googlegroups.com>
Sent: Tuesday, August 22, 2006 10:07 AM
Subject: [cfaussie] Re: Access Lock File


>
> Hi Charlie,
>
> When I create the datasource I turn off the maintain datasource connection
> option. Before I delete the datasource I had tried to turn on the disable 
> db
> connections option as well. I have stuck with the old cf 6 cfc for the
> moment. I'll wait till cf 8 then try to use the cf admin api again. the
> driver I'm using the follwoing code to create the datasource -:
>
> <cfscript>
>   adminObj = createObject("component","cfide.adminapi.administrator");
>   adminObj.login("mypassword");
>   // Instantiate the data source object.
>   myObj = createObject("component","cfide.adminapi.datasource");
>   // Create a DSN.
>   myObj.setMSAccessUnicode(name="#Attributes.datasource#", databasefile =
> "#Attributes.path##Attributes.datasource#.mdb", maintainconnect = 0,
> enablemaxconnections = 1, maxconnections = 1);
> </cfscript>
>
> Then I insert some data into the datasource and then run this code to 
> remove
> the datasource.
>
> <cfscript>
>   adminObj = createObject("component","cfide.adminapi.administrator");
>   adminObj.login("mypassword");
>   // Instantiate the data source object.
>   myObj = createObject("component","cfide.adminapi.datasource");
>   // Remove a DSN.
>   myObj.deletedatasource(dsnname="#Attributes.datasource#");
> </cfscript>
>
> As mentioned I had played around with trying to disable the datasource
> connection option as well with the following code -:
>
> <cfscript>
>   adminObj = createObject("component","cfide.adminapi.administrator");
>   adminObj.login("mypassword");
>   // Instantiate the data source object.
>   myObj = createObject("component","cfide.adminapi.datasource");
>   // Modify the dsn.
>   myObj.setMSAccessUnicode(name="#Attributes.datasource#", databasefile =
> "#Attributes.path##Attributes.datasource#.mdb", maintainconnect = 0,
> enablemaxconnections = 1, maxconnections = 1, disable = 1, timeout = 1);
> </cfscript>
>
> So I have looked into those options but still the lock file persists ?? It
> may be that there is an issue with the OS itself or maybe with the admin
> api??
>
> Rod
>
> ----- Original Message ----- 
> From: "Charlie Arehart" <[EMAIL PROTECTED]>
> To: <cfaussie@googlegroups.com>
> Sent: Tuesday, August 22, 2006 1:30 AM
> Subject: [cfaussie] Re: Access Lock File
>
>
>>
>> Rod, no one has mentioned this: have you gone into the "show advanced
>> settings" button of the datasource definition (in the CF Admin) to tell 
>> it
>> "turn off" the "maintain connections" option? That's what's really 
>> causing
>> the lock (as would any app that opened and kept open the .mdb file). Of
>> course, as others have proposed, getting off of Access should be the next
>> step (I realize that may be out of your hands).
>>
>> One other thought, if this doesn't work, is to ask whether your 
>> datasource
>> is defined in the CFMX admin as being an "ODBC socket" or a "Microsoft
>> Access" type. The former means you point at an existing ODBC DSN, where
>> the
>> latter uses a built-in connection CFMX offers using DataDirect. Whichever
>> you have, try the other. Shouldn't have any negative impact on how the
>> code
>> works (but of course you should thoroughly test before relying on the
>> change
>> in production).
>>
>> Let us know how it goes.
>>
>> /charlie
>> http://www.carehart.org/blog/
>>
>> -----Original Message-----
>> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
>> Behalf
>> Of Rod Higgins
>> Sent: Sunday, August 20, 2006 9:13 PM
>> To: cfaussie@googlegroups.com
>> Subject: [cfaussie] Re: Access Lock File
>>
>>
>> The problem is releasing the lock file so users can download the access
>> db.
>> Currently cf retains the lock file no matter what I try to do, while this
>> lock file is present the OS can not delete, rename or remove either the
>> lock
>> file or the access db, so this stops any user gaining access to it. Kinda
>> frustrating. At first I thought there was some sort of error in the 
>> insert
>> code but I broke that down to a single query and still I have the same
>> problems. I did a google search but can't dig up any issues with the cf
>> admin api so I can only assume it's either my code or some issue with the
>> OS?
>>
>> ----- Original Message -----
>> From: "Chad Renando" <[EMAIL PROTECTED]>
>> To: <cfaussie@googlegroups.com>
>> Sent: Monday, August 21, 2006 11:03 AM
>> Subject: [cfaussie] Re: Access Lock File
>>
>>
>>>
>>> So where is the problem?  Is it in dumping to the Access DB or in the
>>> download?
>>>
>>> If it is in dumping to the Access DB, can you not just run a delete
>>> and insert query to update with the latest data?
>>>
>>> How many users?  Another solution may be to dump to a comma delimited
>>> file which the user downloads and run an automated import using Access
>>> on the client side.
>>>
>>> Chad
>>>
>>> On 8/21/06, Rod Higgins <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Hi Chad,
>>>>
>>>> Im using access to dump very small sections of data from a much larger
>>>> SQL
>>>> database so users can download the access db and run ad hoc reports 
>>>> from
>>>> it.
>>>> I am not using access as a primary datasource. And no DTS is not an
>>>> option -
>>>> mostly due to security / access concerns to the primary datasource and
>>>> complexity of the parameters passed into the extraction process.
>>>>
>>>> Rgds
>>>> Rod
>>>>
>>>> ----- Original Message -----
>>>> From: "Chad Renando" <[EMAIL PROTECTED]>
>>>> To: <cfaussie@googlegroups.com>
>>>> Sent: Monday, August 21, 2006 10:47 AM
>>>> Subject: [cfaussie] Re: Access Lock File
>>>>
>>>>
>>>> >
>>>> > I ran into it, but had to design my app in a manner that didn't
>>>> > require DB creation stuff in an Access file.  Main reason I move to
>>>> > SQL.
>>>> >
>>>> > Chad
>>>> >
>>>> > On 8/21/06, Rod Higgins <[EMAIL PROTECTED]> wrote:
>>>> >>
>>>> >> Hi,
>>>> >>
>>>> >> Currently I am having major issues with creating an MS Access with
>>>> >> Unicode
>>>> >> datasource via the CF admin api. The datasource is created I pump
>>>> >> some
>>>> >> data
>>>> >> into the access db but then it seems to create a lock file that will
>>>> >> not
>>>> >> release even after I remove the datasource via the same api. The
>>>> >> usual
>>>> >> malformed query workaround doesn't seem to release the lock file nor
>>>> >> any
>>>> >> other workaround I have tried. Has anyone come across this and have 
>>>> >> a
>>>> >> solution that works to release the lock?
>>>> >>
>>>> >> CF7 Ent on Windows 2003.
>>>> >>
>>>> >> TIA
>>>> >> Rod
>>>> >>  >
>>>> >>
>>>> >
>>>> > >
>>>> >
>>>>
>>>>
>>>> >
>>>>
>>>
>>> >
>>>
>>
>>
>>
>>
>>
>> >
>>
>
>
> >
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to