coisox 0 Report post Posted March 15, 2008 Aku buat web application. Ada satu field tu nama dia InvoiceNumber. So InvoiceNumber nie format dia "DSB-####" where #### refer to sequence.So lets say aku type "DSB-0001" kat field tu, bila click save button, dia kuar error "Application uses a value of the wrong type for the current operation".Kalau aku type "DSB-1" boleh, but "DSB-01", "DSB-001", "DSB-0001" semula takleh.Kat MS Access, aku dah set field size jadi 50 pun takleh. Aku dah try tukat setting Unicode Compression, IME Mode, IME Sentence Mode semua macam takde kena mengena.Solution yg aku terpaksa buat is pecahkan nombor invoice tu kepada 2 bahagian baru simpan. Tapi cam tak best laa sebab takkan "DSB-0001" takleh considered as text? Quote Share this post Link to post Share on other sites
TonikCapGajah2013 175 Report post Posted March 15, 2008 (edited) DSB-0001 --> Data type sepatutnya Text. Takkan tak boleh masuk.Memang boleh masuk. Edited March 15, 2008 by PowerRootTongkatAli_GS Quote Share this post Link to post Share on other sites
coisox 0 Report post Posted March 15, 2008 (edited) Actually aku pakai Dreamweaver. So semua command dia generate sendiri lepas aku click2. After study the computer generated coding, aku rasa info nie penting. Please advise.Nie error yg panjang lebar. Aku dah cuba ubah manually parameter ke-2 kepada 129,130,132,138,200,201,202, 203. Now still mencuba yg lain.Script error detected at line 65. Source line: MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 200, 1, 50, Request.Form("fieldInvoice")) ' adVarWChar Description: Application uses a value of the wrong type for the current operation. Edited March 15, 2008 by Coisox Quote Share this post Link to post Share on other sites
coisox 0 Report post Posted March 15, 2008 Aduh.... sorry laa. Entah apa puncanya. Aku delete file asp tu then buat semula from scratch boleh laa plak. Agaknya code aku dah messy. Quote Share this post Link to post Share on other sites