troubleshooting Question

Conversion from String to type Double is not Valid Error

Avatar of DeniseGoodheart
DeniseGoodheart asked on
.NET ProgrammingVisual Basic.NET
4 Comments1 Solution683 ViewsLast Modified:
Good Day:

I am using VB.NET 2005 with SQL Server 2000.  I am attempting to write a dynamic SQL string based on the user input.  I get an error that reads Conversion from String to type Double is not valid for the following:

sWhere = "h.PONumber =  'P" & CDbl(Format(Int(txtPO.Text), "000000#")) & "'"

The entire code section is as follows:
If Me.cboInquiryType.Text = "P" Then
            sWhere = "h.PONumber =  'P" & CDbl(Format(Int(txtPO.Text), "000000#")) & "'"
End IF

Any Suggestions?
Thank You,
Denise


If Me.cboInquiryType.Text = "P" Then
            sWhere = "h.PONumber =  'P" & CDbl(Format(Int(txtPO.Text), "000000#")) & "'"
End IF
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros