Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Question - formatting textboxes and inserting values into database

$
0
0
Hi,

I am creating an online interval report for my employer - our programmer is no longer with us. Have some Java knowledge and touched briefly on VB and .Net so I was handed this assignment. Pretty much everything is working except adding items to the database.

I am trying to insert values from textboxes into a SQL database. I am using Visual Studios 2010 and coding in VB.

I've created the tables and declared the values in the tables but when compiling the code, I am getting the following error:

"Error 25 Argument not specified for parameter 'Interval' of 'Public Overridable Overloads Function Insert(Interval As Date?, Forecast As Decimal?, CO As Decimal?, CA As Decimal?, AHT As Decimal?, SLA As Decimal?, Occ As Decimal?, CPC As Decimal?, VTO As Decimal?, MissedHR As Decimal?, Queue As Decimal?, Comments As String) As Integer'.

The code I have is as follows:

Protected Sub btneSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btneSubmit.Click
        
        Dim WorkTier1 As New DataSet1TableAdapters.WorkTier1TableAdapter
        WorkTier1.Insert(Forecast:=tbxeForecast.Text, CO:=tbxeCO.Text, CA:=
                             tbxeCA.Text, AHT:=tbxeAHT.Text, SLA:=
                             tbxeSLA.Text, Occ:=
                             tbxeOcc.Text, CPC:=
                             tbxeCPC.Text, VTO:=
                             tbxeVTO.Text, MissedHR:=
                             tbxeMissedHR.Text, Queue:=
                             tbxeQueue.Text, Comments:=
                             tbxeComments.Text)



I have not added the Interval field as a text box as I want the database to enter it in automatically when the submit button is clicked. The Interval is set as smalldatetime. The data is submitted only 5 times a day and the Interval is used as a time stamp for when the data was submitted. I realize that I may be going about this the wrong way.

I know I have to convert the data that is being entered into the text boxes but I am confused on how to do that and still have the data inserted into the table properly.

Can someone point me in the right direction on how to do this properly? I am learning as I am going on.

Thank you.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>