ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 7th, 2012, 04:56 AM
blankon blankon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 1 blankon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 44 sec
Reputation Power: 0
Lose certain values from array

I've the code to input the values dynamically, when I use it to add the values for the first time, it's fine, but when I want to edit it, the old values didn't inserted on sql query but the new values inserted

Here is the example:

http://i.stack.imgur.com/dwugS.jpg

here is the code:

============the function=================

Code:
    sub ShowItemfgEdit(query,selItemName,defValue,num,cdisable)
    		response.write "<select " & cdisable & " num=""" & num & """ id=""itemCombo"" name=""" & selItemName & """ class=""label"" onchange=""varUsage.ChangeSatuanDt(this)"">"
    		if NOT query.BOF then
    			query.moveFirst
    			WHILE NOT query.EOF
    				tulis = ""
    				if trim(defValue) = trim(query("ckdbarang")) then
    					tulis = "selected"
    				end if
    				response.write "<option value=""" & trim(query("ckdbarang")) & """" & tulis & ">" & trim(query("ckdbarang")) & " - " & trim(query("vnamabarang"))
    				query.moveNext
    			WEND
    		end if
    		response.write "</select>"
    	end sub	


============calling the function================
Code:
    <td class="rb" align="left"><% call ShowItemfgEdit(qGetItemfgGrp,"fitem",qGetUsageDt("ckdfg"),countLine,readonlyfg) %></td>


==============post the value======================
Code:
    <input type="hidden" name="fitem" value="">


================get the value===================

Code:
    for i = 1 to request.form("hdnOrderNum")
    		if request.form("selOrdItem_" & i) <> "" then
    			
    			'bla...blaa...blaa...
    			
    			ckdfg = trim(request.form("fitem_" & i)) '<==here is the problem
    			
    			
    			objCommand.commandText = "INSERT INTO IcTrPakaiDt " &_
    										"(id, id_h, ckdunitkey, cnopakai, dtglpakai, ckdbarang, ckdgudang, nqty1, nqty2, csatuan1, csatuan2, nqtypakai, csatuanpakai, vketerangan, cJnsPakai, ckdprodkey, ckdfg, ncountstart, ncountstop, ncounttotal) " &_
    										" VALUES " &_
    										" (" & idDt & ",'" & idHd & "','" & selLoc & "','" & nopakai & "','" & cDate(request.form("hdnUsageDate")) & "','" & trim(ckdbarang) & "','" & trim(ckdgudang) & "'," & nqty1 & "," & nqty2 & ",'" & trim(csatuan1) & "','" & trim(csatuan2) & "'," & nqtypakai & ",'" & csatuanpakai & "','" & trim(keteranganItem) & "','" & trim(cjnspakai) & "','" & ckdprodkey & "','" &ckdfg& "'," & cnt1 & "," & cnt2 & "," & totalcnt & ")"
    			set qInsertPakaiDt = objCommand.Execute
    			
    		end if
    	next

problem: old value of `ckdfg` didn't inserted to query, but the new value inserted.
How to fix this bug?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Lose certain values from array

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap