-I claim no credit for this code
-I did check debuging and the inserts only list once
in the debugging code
-The database is access (and unfortunately won't be
changed)
Oh and while I'm here anybody come up with any
solutions around.
[Microsoft][ODBC Microsoft Access Driver] Could not
update; currently locked by user 'admin' on machine
errors
-Joshua O'Connor-Rose
-All is Good
code below
---------------------------------------------
<cfloop list="#form.fieldnames#" index="y">
<cfif y contains 'BULLETNEW_' and listgetat(y, 2,
'_') eq this_id>
<!--- <cfoutput>#y# - #evaluate(y)# -
#evaluate('BULLETORDERNEW_' & this_id & '_' &
listlast(y, '_'))#</cfoutput><br> --->
<cfif trim(evaluate(y)) neq ''>
<cfquery datasource="media" name="add_bullets" >
insert into custom_bullets
(media_id,custom_ad_id,ordering,content)
values
(#url.id#,#this_id#,#evaluate('BULLETORDERNEW_' &
this_id & '_' & listlast(y, '_'))#,'#evaluate(y)#')
</cfquery>
</cfif>
<cfelseif y contains 'bulletold_' and listgetat(y, 2,
'_') eq this_id>
<cfif trim(evaluate(y)) neq ''>
<cfquery datasource="media" name="update_bullets">
update custom_bullets
set content = '#evaluate(y)#',
ordering = #evaluate('BULLETORDERold_' & this_id &
'_' & listlast(y, '_'))#
where custom_bullet_id = #listlast(y, '_')#
</cfquery>
<cfelse>
<cfquery datasource="media" name="update_bullets">
delete *
from custom_bullets
where custom_bullet_id = #listlast(y, '_')#
</cfquery>
</cfif>
</cfif>
</cfloop>
--- [EMAIL PROTECTED] wrote:
> got code?
>
>
>
>
>
> Joshua OConnor-Rose <[EMAIL PROTECTED]>
> 06/29/2004 01:07 PM
> Please respond to cf-talk
>
>
> To: CF-Talk <[EMAIL PROTECTED]>
> cc:
> Subject: Duplicate inserts
>
>
> I'm having an issue with duplicate records being
> created on a single insert (at least on the
> debugging
> side)
>
> does anybody know of any issues regarding this.
>
> Its not the first time I've seen it.
>
> I thought I posted this before but it didn't come up
> on a search.
>
> -Joshua O'Connor-Rose
> -all is Good
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

