kaybenleroll
New member
- Joined
- Jul 12, 2006
- Messages
- 4
- Programming Experience
- Beginner
Hello, I'm using VB.NET to draw data from an Access Database. However, I get an error whenever I try to use any type of query which is not a simple
Specifically, I am trying to run the following SQL code:
I use the following code to fill the datatable:
The myAdapter.Fill line throws an exception for any type of query which is not of the basic form:
Even queries like
are causing it to throw an exception.
Any help or enlightenment would be greatly appreciated.
Thank you.
SELECT * FROM (table)
Specifically, I am trying to run the following SQL code:
SELECT date, Table1.close AS prod1, Table2.close AS prod2
FROM Table1, Table2
WHERE Table1.date = Table2.date
I use the following code to fill the datatable:
Dim myConnect As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=vol_engine.mdb")
Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter(SQLCommand, myConnect)
Dim myDataSet As DataSet = New DataSet()
Try
myConnect.Open()
myAdapter.Fill(myDataSet, "myData")
...
The myAdapter.Fill line throws an exception for any type of query which is not of the basic form:
SELECT * FROM (Table)
Even queries like
SELECT date, open, close FROM Table1
are causing it to throw an exception.
Any help or enlightenment would be greatly appreciated.
Thank you.
Last edited: