Thanks guys
Yes I surrounded the code of my submit portion with try catch clause and I found out the error. There was one of my text boxes which was not supplying the correct format in which the method was expecting it to be thus raising that exception. But initially, as i dont have much experience in .NET I thought we needed some other piece of code to allow double submitting actions!
Continuing the discussion, how...
User Profile
Collapse
-
Re-submitting click action event problem
Hi all,
I have a problem with my form i created. When I click the submit button, everything works fine, all data are committed to database but if the user happens to click the submit again, the following exception occurs: Any idea?
I have cleared all my parameters for the insert command.
A first chance exception of type 'System.FormatE xception' occurred in System.Data.dll
standby being added
4... -
Hi guys
just sorted out the problem. It was with my stored procedure parameters. I cannot leave a variable in the file without declaring it because sql database server will expect it. So better comment every variable that is not to be passed to the sql command! Also, I had to check the parameters in the properties in design mode of my SqlDataAdapter. In my case, I had to clear everything that was being generated.Leave a comment:
-
i dont understand. I have commented all of the parameters i am passing to my update command except that of price, ie, only one parameter of type float. By the way am using stored procedure and the type is float there as well. But now getting this error:
A first chance exception of type 'System.Data.Sq lClient.SqlExce ption' occurred in System.Data.dll
at System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,...Leave a comment:
-
Update command with parameters problem
...Code:Private Function AddCompanyOvertime() As Integer Dim companyID As Integer = GetCompanyID() Console.WriteLine(companyID) Dim paramCompanyID As New SqlParameter("@CompanyID", SqlDbType.Int) Dim paramCompanyOvertimeID As New SqlParameter("@companyOvertimeID", SqlDbType.Int) Dim paramDate As New SqlParameter("@Date", SqlDbType.DateTime) -
no actually i didnt check for that maybe thats why its throwing an exception somewhere...let me do a check for that and see what it givesLeave a comment:
-
you mean my code has got an error? i thought vb was not case sensitive? i forgot to mention that i get only the first result in my data table shown in my textbox to display the price. When i do another selection in my combo then the exception results! NULL somewhere or something?Leave a comment:
-
sorry about that ... that stack trace gives me this:
A first chance exception of type 'System.Argumen tException' occurred in System.Windows. Forms.dll
at System.Windows. Forms.ControlBi ndingsCollectio n.CheckDuplicat es(Binding binding)
at System.Windows. Forms.Binding.C heckBinding()
at System.Windows. Forms.Binding.S etBindableCompo nent(IBindableC omponent value)
at System.Windows. Forms.ControlBi ndingsCollectio n.AddCore(Bindi ng...Leave a comment:
-
am using vb.net 2008 EE and when i look at the Call Stack window during runtime, it doesnt show me any stack trace? am i missing something there? i have my line numbers displayed in the editor though.Leave a comment:
-
Thanx Nathan for the reply
The error is :
A first chance exception of type 'System.Argumen tException' occurred in System.Windows. Forms.dllLeave a comment:
-
textbox binding problem
hi
i am having a runtime error when am trying to bind a textbox to a column in my data table. Error is ArgumentExcepti on. Here is my code, basically am querying database to get price and date where date is placed in a combobox and i want price to be displayed in the textbox. Any idea?
...Code:Try selectedSiteName = SiteNameCBox.SelectedValue.ToString selectedCategory = CategoryCBox.SelectedValue.ToString -
VB.NET windows forms newbie question
Hi.
I am new to VB.NET windows forms. I am creating a forms where there are a number of text boxes and drop down lists. In ASP.NET we can just add an SqlDataSource and create a query that accepts parameters (e.g @param1, etc) that corresponds to any number of text boxes present on the form.
I cant seem to be able to do this in windows forms in design mode. Is there a way to achieve that or the only way to do it...
No activity results to display
Show More
Leave a comment: