exo se 1 selida tin parakato forma
kai sto george.asp exo ton parakato kodika
Dim numper1
Dim numper2
Dim Apotelesma
numper2 = 1
numper1 =Lcase(Request.Form("posotita"))
Response.Write(numper1)
Response.Write("
")
Apotelesma = numper1 * numper2
Response.Write(Apotelesma)
giati ean stin forma mou valo dekadiko (px. 1.6) otan tha kanei ton polaplasiasmo mou fernei 16???afou to numper2 exei tin timi 1!!!pos tha to kano na fernei to sosto?diladi 1.6
Στην θέση του 1.6 δώσε 1,6
:) s'euxaristo poli alla mallon den to dieukrinisa!!Ean valo 1,6 tha mou xtipisei poio kato otan tha pao na to peraso ston sql!!Exo ftiaksei mia efarmogoula pou pezei panta me tin telia(1.6) giati otan eisago dedomena ston sql den xtipaei error converting data type varchar to numeric!Kai thelo na matho ean eiparxei kapoios aplos tropos na orizeis oti enas dekadikos einai me . kai oxi me , i to antistrofo!
euxaristo pantos gia tin apantisi sou,pou pistevo na me ekane poio safi sto ti thelo na kano
<%Option Explicit
Response.Expires =-1000
Dim numper1
Dim numper2
Dim Apotelesma
Dim CounterLine2
Dim UnQty_Proto
Dim position3
numper2 = 1
numper1 =Lcase(Request.Form("posotita"))
CounterLine2 = len(numper1)
position3 = InStr(1, numper1, ".", vbTextCompare)
IF position3 <> 0 Then
UnQty_Proto = Mid(numper1, 1, (position3-1)) & "," & Mid(numper1, (position3+1),CounterLine2)
Else
UnQty_Proto = numper1
End IF
Response.Write(UnQty_Proto)
Response.Write("<br>")
Apotelesma = UnQty_Proto * numper2
Response.Write(Apotelesma)
%>
Gia na apantame kai stis apories mas gia na mathenei o kosmos!!ego ekana to prapano kai pezei mia xara.
Alla epidi mou fenete poli paranohko kati poio aplo den iparxei re pedia???
Vrika kai kati poio aplo pou einai to parakato!!!!!
replace(cstr(numper1),",",".")
otan kaneis : numper1 =Lcase(Request.Form("posotita"))
to pairnei san xaraktira anti gia arithmo. bgale to Lcase
tha valeis 1,6 kai sto erotima gia ton sql apla tha valeis tin timi 1,6 se eisagogika dil '1,6' to idio provlima eixa kai go
tip: Δεν υπάρχουν καλοί άνθρωποι , παρά μόνο εκείνοι που γελούν . * F5 για νέο tip