If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > syntax error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-27-03, 13:49
garrydawkins garrydawkins is offline
Registered User
 
Join Date: Apr 2003
Location: Washington DC area
Posts: 1,311
Red face 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
Reply With Quote
  #2 (permalink)  
Old 12-27-03, 16:05
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
The DataSource should be set to the DataSet and not the DataAdapter.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On