1.Create chart 2.copy from microsoft office

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lauclaw
    New Member
    • Apr 2010
    • 6

    1.Create chart 2.copy from microsoft office

    First, i wish to create line chart, pie chart and bar chart using vb.net of visual studio 2005.
    Second question is i wish to copy a few data into datagridview from microsoft office tools such as access or excel using shortcut key 'ctrl+C' and 'ctrl+V'.
    Any suggested code to do the 2 functions above without installing additional tools?
  • semomaniz
    Recognized Expert New Member
    • Oct 2007
    • 210

    #2
    Show us what you have done so far? Asking the question by stating I want to..... isnt the right way to ask.

    My suggestion to you is use google to do some research and then implement what you have learned from your research and then when you run in to an error post your question.

    Comment

    • lauclaw
      New Member
      • Apr 2010
      • 6

      #3
      Originally posted by semomaniz
      Show us what you have done so far? Asking the question by stating I want to..... isnt the right way to ask.

      My suggestion to you is use google to do some research and then implement what you have learned from your research and then when you run in to an error post your question.
      actually my friends suggested me to refer this link:

      but i dont really understand what the included source code.

      second question:
      Code:
      Dim cn1 As New OleDbConnection
                  Dim cm1 As New OleDbCommand
                  Dim da1 As New OleDbDataAdapter
                  Dim strConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & link)
                  cn1 = New OleDb.OleDbConnection(strConnectionString)
                  cn1.Open()
                  cm1.CommandText = "Select * from data"
                  cm1.Connection = cn1
                  da1.SelectCommand = cm1
                  da1.Fill(ds, "data")
                  Me.DataGridView1.DataSource = ds.Tables("data")
                  cn.Close()
      link is openfile dialog and when i select a database of ms access, it get error of 'unrecognize database'

      Comment

      • semomaniz
        Recognized Expert New Member
        • Oct 2007
        • 210

        #4
        you need to revise line 4. There is not datasource provided.

        Comment

        • semomaniz
          Recognized Expert New Member
          • Oct 2007
          • 210

          #5
          Also there are various ways of creating charts. Here is the link

          For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            What does the variable "link" contain on line 4?

            Comment

            Working...