TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajkumar R
NA
183
220k
How to convert varchar to numeric
Dec 29 2011 2:05 AM
Dim cmdinsert As New SqlCommand("insert into VMIS_30(RptUnitTypeID,Rpt_Unit,YYYYMM,pipno,name1,clt,savings,typ_loan,amt,no_installme,rate_interest,randm_code)values('" + dr("UNITTYPE") + "','" + dr("VPRCID") + "'," + dr("YYYYMM") + ",'" + repipcode + "','" + dr("NAMEOFTHEMEMBER") + "','" + shgcode + "'," + dr("SAVINGS") + ",'" + dr("TYPELOAN") + "'," + dr("AMOUNT") + "," + dr("NOOFINSTALLMENT") + "," + dr("RATEOFINTEREST") + "," + rancode1.ToString() + ")", conDB)
From the above statement i want convert this(" + dr("SAVINGS") + ") from varchar to numeric
here i m getting data from XML file, then i m importing into database. Here the savings field i m getting null value from XML FILE but in the backend(sqlserver) savings field defined as numeric. While i try to insert null value into DB i m getting error (ie., error converting datatype) so i need to convert here from varchar to numeric
Sorry for interrupt
Post solution for this post
Thanks in advance
Reply
Answers (
3
)
Erp implementation in.net project
MVC in ASP .Net Development