Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

AAGTHosting

@AAGTHosting
About
Posts
118
Topics
68
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Paramater name: binding error
    A AAGTHosting

    When I open the admin form from the file menu of the main form then close the admin form and open it again I get a binding error. Here is the error. Why am I getting the error? This causes two bindings in the collection to bind to the same property. Parameter name: binding

    Visual Basic wpf wcf help question

  • Validating a listView
    A AAGTHosting

    This is my validation if statement. When I debug I get an error. Can you give me an example of how to check for a checked item using the boolean value?

    If lvwRent.CheckedItems(0).Text Is "" Then

    Visual Basic tutorial

  • Validating a listView
    A AAGTHosting

    I need to be able to validate the list View. I need to know how to check and see if the user did not check a box.

    Visual Basic tutorial

  • getting selected row index from a listView
    A AAGTHosting

    How do I get the selected row index from a listView?

    Visual Basic question database

  • Problems updating database
    A AAGTHosting

    I am writing a software program. When I tried to add a student and then check the student drop down box the student added successfuly, but when I try to add a lesson the lesson does not add. I added a message box to see if the info was adding to the dataRow for the database Update and the info showed up in the messageBox. When I check the lesson listView the lesson is not there. How do I find out if the lesson is adding to the database? I am using SQL Server Express 2005 and the Copy to output directory is set to copy always. Here is my code.

    Public addRow As DataRow

    MsgBox(txtInstrument.Text & "," & Convert.ToInt32(cboSelectStudent.SelectedValue) & "," & Convert.ToDateTime(dtpStartDate.Text) & "," & Convert.ToDateTime(dtpEndDate.Text) & "," & Convert.ToDateTime(lvwItem.SubItems(1).Text) & "," & intDay & "," & Convert.ToInt32(cboSelectTeacher.SelectedValue) & "," & intLessStat)

            addRow = lpDataSet.tbl\_lessons.Newtbl\_lessonsRow()
            addRow("less\_instrument") = txtInstrument.Text
            addRow("stud\_id") = Convert.ToInt32(cboSelectStudent.SelectedValue)
            If dtpStartDate.Visible = True Then
                addRow("less\_start\_date") = Convert.ToDateTime(dtpStartDate.Text)
            End If
            If dtpEndDate.Visible = True Then
                addRow("less\_end\_date") = Convert.ToDateTime(dtpEndDate.Text)
            End If
            If lvwChooseTimeslot.Visible = True Then
                addRow("less\_time") = Convert.ToDateTime(lvwItem.SubItems(1).Text)
                addRow("less\_day") = intDay
                addRow("teach\_id") = Convert.ToInt32(cboSelectTeacher.SelectedValue)
            End If
            addRow("less\_status") = intLessStat
            lpDataSet.tbl\_lessons.Rows.Add(addRow)
    

    lessonTableAdapter.Update(addRow)

    Visual Basic database question css sql-server sysadmin

  • Validating form fields in VB.NET
    A AAGTHosting

    I have a form in a software program where the user can type in their information. When the zip cod form field is empty and I submit the form I get an error that says the string is in the wrong format, but when the field is filled in I don't get the error. How do I check to see if someone has filled in a text box in the form or if it is empty?

    Visual Basic question csharp help

  • Problems updating database
    A AAGTHosting

    I added a student to the database when in debug mode, but when I exit out of debug mode and then go back into debug mode the new student record is not there. Do you know why? Do I need to commit the changes to the database? I am using acceptChanges. I also add lesson information for the student. When I try to add the lesson information it doesn't even add to the database. Why does the student add but not the lesson? When I used a message box to display the lesson info it displayed. Here is my code to add the student. addRow = lpDataSet.tbl_students.Newtbl_studentsRow() addRow("stud_name") = txtStudentName.Text addRow("stud_par_name") = txtParentName.Text addRow("stud_add") = txtStudAdd.Text addRow("stud_unit_num") = txtAptNum.Text addRow("stud_city") = txtCity.Text addRow("stud_state") = txtState.Text addRow("stud_zip") = Convert.ToInt32(txtZip.Text) addRow("stud_email") = txtEmail.Text addRow("stud_cell") = txtStudCell.Text addRow("stud_phone") = txtStudPhone.Text addRow("stud_status") = intStudStat lpDataSet.tbl_students.Rows.Add(addRow) studTableAdapter.Update(addRow) lpDataSet.Tables("tbl_students").AcceptChanges() Here is the code to add the lesson. addRow = lpDataSet.tbl_lessons.Newtbl_lessonsRow() addRow("less_instrument") = txtInstrument.Text addRow("stud_id") = Convert.ToInt32(cboSelectStudent.SelectedValue) addRow("less_start_date") = Convert.ToDateTime(dtpStartDate.Text) addRow("less_end_date") = Convert.ToDateTime(dtpEndDate.Text) addRow("less_time") = Convert.ToDateTime(lvwItem.SubItems(1).Text) addRow("less_day") = intDay addRow("teach_id") = Convert.ToInt32(cboSelectTeacher.SelectedValue) addRow("less_status") = intLessStat lpDataSet.tbl_lessons.Rows.Add(addRow) lessonTableAdapter.Update(addRow) lpDataSet.Tables("tbl_lessons").AcceptChanges()

    Visual Basic question database debugging announcement

  • Using SelectedItem to have pre select item in combo box
    A AAGTHosting

    I have a list view and when the user selects an item in the list view there is a combo box that has a list of teacher names in it. I am trying to pre select a teacher name when the user click on the item in the list view, but the teacher name is not changing when the user clicks on the item in the list view. I hard coded a selectedValue which is the teacher id to see if the teacher name would change in the combo box and it did. Here is my code. Why is this happening? Private Sub lvwSelectLess_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles lvwSelectLess.MouseDown grpBxLessonInfo.Visible = True Dim dt As New DataTable() Dim lvwItems As New ListViewItem() Dim selection As ListViewItem = lvwSelectLess.GetItemAt(e.X, e.Y) If (selection IsNot Nothing) Then MsgBox(selection.SubItems(4).Text) cboSelectTeacher.SelectedItem = selection.SubItems(4).Text ' this si the line of code to set a pre selected item in the combo box. txtInstrument.Text = selection.SubItems(3).Text lblStartDate.Text = selection.SubItems(5).Text dtpEndDate.Text = selection.SubItems(6).Text End If End Sub

    Visual Basic question

  • How to design dataTables or DataSets for forms on different panels
    A AAGTHosting

    I have a pretty big program that I am developing. There are 2 different forms in the program. One of the forms has several panels on it and each panel has a form, or several forms. I had all of my queries coming from one dataSet but I had problems with conflicting dataTables. Then I created another dataSet for a couple of my list boxes and then it worked. Then I Tried to create 2 different dataSets for one of my panels. One of the dataSets included the database tables and fields that were needed to fill list and combo boxes with info and the other with the profile and schedule info. When I did this suddenly my form is glitchy. When I get the query from the original dataset it works fine, but when I get the query from the new dataset it does not work. What is the best way to design the datasets for a program to avoid these kinds of problems. Should I use multiple datasets? Would it be better for me to use a getData method instead of a fill method instead of using different datasets.

    Visual Basic database question design tutorial

  • problems insert data in database using table adapter
    A AAGTHosting

    You can't put the name of a dataset coma the name of a table.

    Visual Basic database question announcement

  • problems insert data in database using table adapter
    A AAGTHosting

    When I take the dataRow variable out of the table adapter update function I get the blue line. The error says the following.

    Overload resolution failed because no accesdsible update accepts this number of arguments.

    Why wont the update update or add a row to the database with or without the dataRow variable as an argument?

    Visual Basic database question announcement

  • problems insert data in database using table adapter
    A AAGTHosting

    When I do a database insert there are no errors displayed, but when I check the database the data does not insert into the database. Why? Here is my code. I declared addRow globally. addRow = lpDataSet.Tables("tbl_students").NewRow() addRow("stud_cell") = txtStudCell.Text addRow("stud_phone") = txtStudPhone.Text lpDataSet.Tables("tbl_students").Rows.Add(addRow) Try studTableAdapter.Update(addRow) Catch err As Exception MessageBox.Show(err.Message) End Try

    Visual Basic database question announcement

  • Problem with datatype in database insert
    A AAGTHosting

    I did update the schema of the dataset. In fact, when I tried to change the dataType in the designer it was already text.

    Visual Basic database help announcement

  • Problem with datatype in database insert
    A AAGTHosting

    I checked the dataSet and it says the phone number field is text. Also, when I try to do an insert the info does not get inserted into the database.

    Visual Basic database help announcement

  • Problem with datatype in database insert
    A AAGTHosting

    I have 2 phone number fields in the database that right now are a text dataType. They were an int, then I changed them to varchar(13). When I try to do an insert into the database there is an exception that says the following.

    Failed to convert paramater value from a string to an Integer.

    Here is my code. I declared addRow globally. addRow = lpDataSet.Tables("tbl_students").NewRow() addRow("stud_cell") = txtStudCell.Text addRow("stud_phone") = txtStudPhone.Text lpDataSet.Tables("tbl_students").Rows.Add(addRow) Try studTableAdapter.Update(addRow) Catch err As Exception MessageBox.Show(err.Message) End Try

    Visual Basic database help announcement

  • SQL Execution Error Failed to Convert from dateTime to TimeSpan
    A AAGTHosting

    I looked in the wizard and I can't find a place to select a dataType. One of my table columns is a UDT named time that I created from dateTime. I did not create an assembly. Also the dateTime datatype that I pass in is a dateTime that adds a timespan to change the startTime. Is it possible that the time dataType could cause this? I also increment startTime with timeSpan which is a dateTime dataType in VB.NET. Could this cause the problem?

    Database question database help css

  • SQL Execution Error Failed to Convert from dateTime to TimeSpan
    A AAGTHosting

    I executed the following query using Visual Basic in the Table Adapter wizard. SELECT less_time, less_day FROM tbl_lessons WHERE (teach_id = 100) AND (less_status = 1) AND (less_time = '1/1/1900 3:00:00 PM') AND (less_day = 2) In visual basic I use @param1, @param2 and @param3 for the teach_id, less_time and less_day. When I ran the query in Visual Basic I get the following error, but when I run the identical query using the SQL Server Express I do not get the error. Has anyone seen this error before? Why does it happen? How do I fix it?

    Error Source: System.Data
    Error Message: Failed to convert paramater value from a dateTime to a timeSpan.

    Database question database help css

  • filling 2 different combo boxes with info from same dataTable
    A AAGTHosting

    This only seems to happen when I try to populate the second teacher list box. If I comment out the code to bind a source to the teacher combo box then only the first name on the list of teachers shows up in the teacher list box, then when I click on the students button one of my list boxes shows up, that is not filled dynamically and you can't select a type of student. Should I use multiple datasets so I don't have multiple controls getting info from the tables in the dataset?

    Visual Basic help question

  • filling 2 different combo boxes with info from same dataTable
    A AAGTHosting

    I tried declaring local dataTables and it still does not work. I just ran the same query again and the list box populated, but when I click on the students button to go to that panel all the controls on the panel do not come up. Here is my query. Would it be better for me to use a GetDataBy query instead of a fillBy? The GetDataBy method returns a dataTable.

    Visual Basic help question

  • filling 2 different combo boxes with info from same dataTable
    A AAGTHosting

    It does show data. I populated another list box from the data, but when I make the copy it does not fill the combo box. The list box and the combo box are filled in 2 different sub procedures. The dataTables that I am using are declared globally in a module as public.

    Visual Basic help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups