Salil999's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
15 (0.02 per day)
Joined:
17-January 11
Profile Views:
337
Last Active:
User is offline May 30 2012 03:30 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Playstation
Your Car:
Who Cares
Dream Kudos:
0
Icon   Salil999 has not set their status

Posts I've Made

  1. In Topic: Problem with Visual Studio 2011 - Buttons disappearing and reappearing

    Posted 30 May 2012

    View Postb2.f2, on 30 May 2012 - 10:57 AM, said:

    it is Visible and not Visibility like this:

    Button1.Visible = False/True
    


    I don't get it how can you miss this when you type button and than point+V it appears self ? - ?


    See, that's the problem. I am not using Visual Studio 2010. I know in previous Visual Studio versions it is simply

    Button1.Visible = False/True
    


    I am using Visual Studio 2011, and I am designing a tablet app. I'm not sure how the new code works.
  2. In Topic: Syntax Error - Databases

    Posted 15 May 2012

        Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
            Dim cb As New OleDb.OleDbCommandBuilder(da)
            cb.GetUpdateCommand()
            ds.Tables(Book).Rows(inc).Item(1) = txtFirst.Text
            ds.Tables(Book).Rows(inc).Item(2) = txtLast.Text
            ds.Tables(Book).Rows(inc).Item(3) = txtMail.Text
            da.Update(ds, Book)
            MsgBox("The database has successfully been updated.")
            con.Close()
        End Sub
        Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
            btnCommit.Enabled = True
            btnAdd.Enabled = False
            btnUpdate.Enabled = False
            btnDelete.Enabled = False
            txtFirst.Clear()
            txtLast.Clear()
            txtMail.Clear()
        End Sub
        Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
            btnCommit.Enabled = False
            btnCommit.Enabled = False
            btnAdd.Enabled = True
            btnUpdate.Enabled = True
            btnDelete.Enabled = True
            inc = 0
        End Sub
        Private Sub btnCommit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommit.Click
            Dim cb As New OleDb.OleDbCommandBuilder(da)
            Dim NewRow As DataRow
            NewRow = ds.Tables(Book).NewRow()
            NewRow.Item("FirstName") = txtFirst.Text
            NewRow.Item("LastName") = txtLast.Text
            NewRow.Item("Address") = txtMail.Text
            ds.Tables(Book).Rows.Add(NewRow)
            da.Update(ds, Book)
    
            MsgBox("The new entry has been successfully added.")
            btnCommit.Enabled = False
            btnAdd.Enabled = True
            btnUpdate.Enabled = True
            btnDelete.Enabled = True
        End Sub
    End Class
    


    Actually, sorry. That didn't work. I'm not sure why, but at one point it was working, and when I entered cb.GetUpdateCommand(), it was working. But after I restart my computer, it did not work anymore... Not sure why.

    This problem is also seen in my "Add New" button. It gives a SYNTAX error, both with the adding a new contact and with updating. I'll post my new code and pictures...



    View PostSalil999, on 15 May 2012 - 11:31 AM, said:

    I'm sorry for the late reply, as I did not have access to a computer.

    Thank you for all your help. Ultimately, it was CharlieMay who was correct. I tried all of your methods, and was constantly recieving the same error. Thank you for all your help!

    Also, I am using pradeep1210's suggestion for the new update command and con.close()

    Thanks!!


    The column FirstName is in my table too. I really don't get what's going on with VB.NET...
  3. In Topic: Syntax Error - Databases

    Posted 15 May 2012

    I'm sorry for the late reply, as I did not have access to a computer.

    Thank you for all your help. Ultimately, it was CharlieMay who was correct. I tried all of your methods, and was constantly recieving the same error. Thank you for all your help!

    Also, I am using pradeep1210's suggestion for the new update command and con.close()

    Thanks!!
  4. In Topic: Syntax Error - Databases

    Posted 9 May 2012

    This is the error it is showing me (it is attached)

    Also, I'll be honest and say that I'm not the best coder. This is my first time handling databases, so please explain it to me step by step. What is that cb.GetUpdateCommad() you are using?

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Full Name:
Shashank Saxena
Years Programming:
1
Programming Languages:
VB 2010 (.NET Framework)

Contact Information

E-mail:
Click here to e-mail me

Friends

Salil999 hasn't added any friends yet.

Comments

Salil999 has no profile comments yet. Why not say hello?