G
Guest
I have a question about the OleDBCommand.
I am making a program that needs to load 6 tabels from a Access DataBase.
At the moment I got everything working by making 6 Adapters,
CommandBuilders and using 6 times the Adapter.fill() command. I would like to
know if there is a way to bring it back to 1 Adapter command.
Right know the code looks like this. (I only put 2 Adapter Commands cause
the rest is the same)
tabel1Adapter = new OleDbDataAdapter("SELECT * FROM tabel1", myDB1Connection);
tabel2Adapter = new OleDbDataAdapter("SELECT * FROM tabel2", myDB1Connection);
tabel1Builder = new OleDbCommandBuilder(tabel1Adapter);
tabel2Builder = new OleDbCommandBuilder(tabel2Adapter);
tabel1Adapter.Fill(myDataSET, "tabel1");
tabel2Adapter.Fill(myDataSET, "tabel2");
I tried with "Select * From tabel1 tabel2");
but then I get a error while adding rows.
I hope someone can clarify this for me.
Thanks
Bardo Versteeg.
Beginner C# programmer.
I am making a program that needs to load 6 tabels from a Access DataBase.
At the moment I got everything working by making 6 Adapters,
CommandBuilders and using 6 times the Adapter.fill() command. I would like to
know if there is a way to bring it back to 1 Adapter command.
Right know the code looks like this. (I only put 2 Adapter Commands cause
the rest is the same)
tabel1Adapter = new OleDbDataAdapter("SELECT * FROM tabel1", myDB1Connection);
tabel2Adapter = new OleDbDataAdapter("SELECT * FROM tabel2", myDB1Connection);
tabel1Builder = new OleDbCommandBuilder(tabel1Adapter);
tabel2Builder = new OleDbCommandBuilder(tabel2Adapter);
tabel1Adapter.Fill(myDataSET, "tabel1");
tabel2Adapter.Fill(myDataSET, "tabel2");
I tried with "Select * From tabel1 tabel2");
but then I get a error while adding rows.
I hope someone can clarify this for me.
Thanks
Bardo Versteeg.
Beginner C# programmer.