| | |
conversion problem
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2007
Posts: 9
Reputation:
Solved Threads: 0
i need some help here
i have design a gridview which contains two columns with dropdown list first is emp_id column n second is orderofwork column...when i try to update database with selected values in dropdown it gives me the following error
Conversion from string "update subj_emp_assign set emp_i" to type 'Double' is not valid.
in database emp_id is varchar n orderofwork is int
Dim newEmpId As String
Dim workorder As Integer
newEmpId = CType(gvwJobDetails.Rows(e.RowIndex).Cells(2).Controls(1), DropDownList).SelectedItem.Text
workorder = CInt(CType(gvwJobDetails.Rows(e.RowIndex).Cells(4).Controls(1), DropDownList).SelectedItem.Text)
sqlcmd = New SqlCommand("update subj_emp_assign set emp_id='" + newEmpId.Trim() + "',order_of_work=" + Integer.Parse(workorder) + " where subj_id='" + subjId.Trim() "' ", sqlConn)
i have design a gridview which contains two columns with dropdown list first is emp_id column n second is orderofwork column...when i try to update database with selected values in dropdown it gives me the following error
Conversion from string "update subj_emp_assign set emp_i" to type 'Double' is not valid.
in database emp_id is varchar n orderofwork is int
Dim newEmpId As String
Dim workorder As Integer
newEmpId = CType(gvwJobDetails.Rows(e.RowIndex).Cells(2).Controls(1), DropDownList).SelectedItem.Text
workorder = CInt(CType(gvwJobDetails.Rows(e.RowIndex).Cells(4).Controls(1), DropDownList).SelectedItem.Text)
sqlcmd = New SqlCommand("update subj_emp_assign set emp_id='" + newEmpId.Trim() + "',order_of_work=" + Integer.Parse(workorder) + " where subj_id='" + subjId.Trim() "' ", sqlConn)
![]() |
Similar Threads
- Data loss in Type Conversion. (C++)
- Lite-On CD Burner problem (Storage)
- Need help with this conversion program (C++)
- Java to C# Conversion (C#)
- project conversion (C++)
- conversion type (C++)
- Need help with BASH to MS-DOS Batch conversion. (Shell Scripting)
- ME to XP home network problem (Windows NT / 2000 / XP)
Other Threads in the ASP.NET Forum
- Previous Thread: Dynamically add rows in datagrid
- Next Thread: Regular Expression Pattern
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol ajax alltypeofvideos appliances application asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox commonfunctions control dataaccesslayer database datagridview datagridviewcheckbox datalist deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview google gridview gudi iis image javascript listbox login microsoft mobile mouse mssql news novell numerical opera panelmasterpagebuttoncontrols parent radio redirect registration relationaldatabases reportemail save schoolproject search security select sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos view vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers






