Results 1 to 2 of 2

Thread: syntax error

  1. #1
    Join Date
    Apr 2003
    Washington DC area

    Red face Unanswered: syntax error

    Private Sub Button_A_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_A.Click
    Imports System.Data.OleDb

    Dim strSQL As String = "Select * From Customers"
    Dim Connection As New OleDbConnection(strConnection)
    Dim DA As New OleDbDataAdapter(strSQL, Connection)
    Dim DS As New DataSet

    DA.Fill(DS, "Customers")

    dgrdProjects.DataSource = DA
    End Sub

  2. #2
    Join Date
    Feb 2002
    The DataSource should be set to the DataSet and not the DataAdapter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts