D
Diana Mueller
I'm working with ADO.NET for quite a while now (allthough usually within the
SqlClient namespace), but this has never happened before,
The project I'm currently working on has the requirement, that the user
should be able to work with a local access db
or the central sql server as datasource (user's choice). So we decided to
use OleDbConnections, -Commands, -Adapters etc.
so that switching between datasources will only require a change of the
connectionstring.
Now to my problem. I'm trying to fill a DataTable of my typed DataSet with
an OleDbDataAdapter using it's .Fill() function.
The problem is, no rows are added to the table. If I do an .ExecuteReader()
with the adapter's SelectCommand though, all rows that should be returned
are returned (also when executing the command in sql server's query
analyzer). What could be the problem here? I read in the
DbAdapter.Fill(DataTable) help, that
using sql batch commands can lead to problems with the OleDb data provider.
I am filling a temporary table before reading out of it in the command, so
could that be the source of trouble? Has someone an idea what I could do to
fix this?
Any help is (as allways) highly appreciated,
Diana
SqlClient namespace), but this has never happened before,
The project I'm currently working on has the requirement, that the user
should be able to work with a local access db
or the central sql server as datasource (user's choice). So we decided to
use OleDbConnections, -Commands, -Adapters etc.
so that switching between datasources will only require a change of the
connectionstring.
Now to my problem. I'm trying to fill a DataTable of my typed DataSet with
an OleDbDataAdapter using it's .Fill() function.
The problem is, no rows are added to the table. If I do an .ExecuteReader()
with the adapter's SelectCommand though, all rows that should be returned
are returned (also when executing the command in sql server's query
analyzer). What could be the problem here? I read in the
DbAdapter.Fill(DataTable) help, that
using sql batch commands can lead to problems with the OleDb data provider.
I am filling a temporary table before reading out of it in the command, so
could that be the source of trouble? Has someone an idea what I could do to
fix this?
Any help is (as allways) highly appreciated,
Diana