| | |
conversion from string to double error
Please support our VB.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
- Quick Conversion Question (C++)
- Choice Selection help (VB.NET)
- error C2375: 'my_strdup' : redefinition; different linkage (C++)
- Type Conversion of User Input: (C++)
- A quick question (VB.NET)
- arrays and functionality of the program... (C++)
- Point to Point3D Inheritance (C++)
- Program Compiles fine, but error upon Running (Java)
- basic fstream stuff (C++)
- Function that returns void (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Displaying Totals based on DB fields
- Next Thread: paging in gridview
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access arithmetic array assignment basic binary bing box button buttons c# center code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 plugin port print printing printpreview problemwithinstallation project record reports" reuse save savedialog serial server sorting sql storedprocedure string structures temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view visual visualbasic visualbasic.net visualstudio web wpf






