Jump to content
coisox

[asp] Kenapa Perkataan "dsb-0001" Takleh Masuk Dalam Databas

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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 by Coisox

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...