Click here to Skip to main content
15,896,730 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Help with structures! Pin
Gregory Gadow21-Apr-10 4:46
Gregory Gadow21-Apr-10 4:46 
QuestionSwitch colums and rows in vb.net datagrid Pin
Peter Leipzig19-Apr-10 16:18
Peter Leipzig19-Apr-10 16:18 
AnswerRe: Switch colums and rows in vb.net datagrid Pin
Dr.Walt Fair, PE19-Apr-10 16:45
professionalDr.Walt Fair, PE19-Apr-10 16:45 
AnswerRe: Switch colums and rows in vb.net datagrid Pin
Ashfield19-Apr-10 22:34
Ashfield19-Apr-10 22:34 
GeneralRe: Switch colums and rows in vb.net datagrid Pin
Peter Leipzig20-Apr-10 3:39
Peter Leipzig20-Apr-10 3:39 
GeneralRe: Switch colums and rows in vb.net datagrid Pin
gmhanna20-Apr-10 5:25
gmhanna20-Apr-10 5:25 
GeneralRe: Switch colums and rows in vb.net datagrid Pin
Ashfield20-Apr-10 8:45
Ashfield20-Apr-10 8:45 
QuestionOLE MS-Access Database - Syntax error in FROM clause Pin
gmhanna19-Apr-10 14:33
gmhanna19-Apr-10 14:33 
Hi,

This should be very straight forward but I am missing something. I have a database in MS-Access to keep track of my Class Reunion information. The table is called "Reunion-Table". I'm trying to read this table with C# and fill a dataGrid. However, I'm receiving an OleDbException from the adapter.fill method, which is saying, Syntax error in FROM clause. Here's my code:
private void DataSetFromOleDb()
        {
            string strSQL =
              "SELECT * FROM Reunion-Table"; // WHERE YOG=1979";


            try
            {
                using (OleDbDataAdapter adapter =
                  new OleDbDataAdapter(strSQL,
                  Properties.Settings.Default.OleDbConnectionString2))
                {

                    DataSet ds = new DataSet();
                    adapter.Fill(ds, "Reunion-Table");
                    dataGridClassReunion.DataSource = ds.Tables["Reunion-Table"];                    
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }


and here's my Connection string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source="H:\users\glenn\documents and settings\db1-0706.mdb"


Any help would be greatly appreciated.

Thank you,
Glenn

AnswerRe: OLE MS-Access Database - Syntax error in FROM clause Pin
Eddy Vluggen20-Apr-10 9:13
professionalEddy Vluggen20-Apr-10 9:13 
QuestionMessage Removed Pin
19-Apr-10 3:56
professionalN_tro_P19-Apr-10 3:56 
AnswerRe: IntelliTrace not what I thought Pin
Dave Kreskowiak19-Apr-10 4:06
mveDave Kreskowiak19-Apr-10 4:06 
GeneralMessage Removed Pin
19-Apr-10 4:12
professionalN_tro_P19-Apr-10 4:12 
GeneralRe: IntelliTrace not what I thought Pin
Dave Kreskowiak19-Apr-10 10:33
mveDave Kreskowiak19-Apr-10 10:33 
Questiondifference between abstract class and interface Pin
Balaji_Reddy19-Apr-10 0:37
Balaji_Reddy19-Apr-10 0:37 
AnswerRe: difference between abstract class and interface Pin
Eddy Vluggen19-Apr-10 2:45
professionalEddy Vluggen19-Apr-10 2:45 
GeneralRe: difference between abstract class and interface Pin
Balaji_Reddy19-Apr-10 4:49
Balaji_Reddy19-Apr-10 4:49 
GeneralRe: difference between abstract class and interface Pin
Richard MacCutchan19-Apr-10 5:01
mveRichard MacCutchan19-Apr-10 5:01 
GeneralRe: difference between abstract class and interface Pin
Eddy Vluggen19-Apr-10 5:32
professionalEddy Vluggen19-Apr-10 5:32 
GeneralRe: difference between abstract class and interface Pin
Luc Pattyn19-Apr-10 6:28
sitebuilderLuc Pattyn19-Apr-10 6:28 
AnswerRe: difference between abstract class and interface Pin
Peace ON19-Apr-10 6:27
Peace ON19-Apr-10 6:27 
GeneralRe: difference between abstract class and interface Pin
Balaji_Reddy21-Apr-10 3:47
Balaji_Reddy21-Apr-10 3:47 
QuestionHow to force Setup project to use prerequisites with older version Pin
rahul.kulshreshtha18-Apr-10 21:32
rahul.kulshreshtha18-Apr-10 21:32 
AnswerRe: How to force Setup project to use prerequisites with older version Pin
Eddy Vluggen19-Apr-10 2:49
professionalEddy Vluggen19-Apr-10 2:49 
GeneralRe: How to force Setup project to use prerequisites with older version Pin
rahul.kulshreshtha19-Apr-10 2:59
rahul.kulshreshtha19-Apr-10 2:59 
GeneralRe: How to force Setup project to use prerequisites with older version Pin
Eddy Vluggen19-Apr-10 3:22
professionalEddy Vluggen19-Apr-10 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.