Advertisement

02.05.2008 at 12:20PM PST, ID: 23139236
[x]
Attachment Details

Need to insert decimal value

Asked by ridlejo in Visual Studio 2008, .Net Editors & IDEs

Tags: vb.net 3.5, IE 7

I am using visual web developer 2008 and .net 3.5.  I have a simple insert statement that inserts a field value in to my table.  On my web form I have a text field called TextBoxrt. In my table this is a decimal value.  It will hold a dollar value.  When I set my form variable and attempt to insert I get Conversion from string "rt" to type 'Integer' is not valid.

Here is my insert statement and parameterStart Free Trial
1:
2:
3:
Dim cmd1 As New System.Data.SqlClient.SqlCommand("Insert Into users (rate) Values (@rt)", conn)
 
        cmd1.Parameters.Add("@rt", System.Data.SqlDbType.Decimal, "rt").Value = request.form("TextBoxrt")
[+][-]02.05.2008 at 12:29PM PST, ID: 20826563

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio 2008, .Net Editors & IDEs
Tags: vb.net 3.5, IE 7
Sign Up Now!
Solution Provided By: pollock_d
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.05.2008 at 01:16PM PST, ID: 20827083

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 01:20PM PST, ID: 20827133

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628