Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on 

inserting amount with comma

Hi, Experts, I've got problem Inserting data on sqlserver 2008 using ASP or vbscript language. My problem here is when the amountA is has a comma then it would not save the Data. A message says; "There are fewer columns in the insert..." This maybe because of the comma in the amountA. What is the solution to handle the comma within the amountA? Any help please!

   ename = "John"
   amountA = "10,000.00"
   
   con.execute("Insert into zPhone(eName,AmountA) values('" & ename & "'," & amountA & ")")
ASPVB Script

Avatar of undefined
Last Comment
Whing Dela Cruz
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Whing Dela Cruz
Whing Dela Cruz
Flag of Anguilla image

ASKER

Thanks a lot Big Monty, this code works amountA = Replace( amountA ,",", "" )
ASP
ASP

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

82K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo