R
Raymond
Hi.
I'm using Access-databases. See code below how I fill the
dataset (almost correct?).
On my client P4 2600Mhz HT this code is pretty fast, a
few hundred milliseconds. The problem is when the
database is on a server. When I open the database trough
the network this could take several seconds. This is way
to much!
What I wonder is if there are any better ways of filling
my dataset? Maby I can't use Access at all when I open
through a network? Must I use for example MSDE? What do
Microsoft generally say about Access, network and .NET?
Is there any special settings on the server I have to
make?
Thank you
/Raymond
Dim mcn As New OleDbConnection
(Provider=Microsoft.Jet.OLEDB.4.0;Data Source="xxx")
Dim sSQL As String
Dim da As New OleDbDataAdapter
Dim cmd As New OleDbCommand
Dim dtm As DataTableMapping = New DataTableMapping
Dim ds As New Dataset
sSQL = "SELECT * FROM x"
cmd.CommandText = sSQL
cmd.Connection = mcn
dtm.DataSetTable = "x"
dtm.SourceTable = "Table"
da.TableMappings.Add(dtm)
da.SelectCommand = cmd
da.Fill(ds)
I'm using Access-databases. See code below how I fill the
dataset (almost correct?).
On my client P4 2600Mhz HT this code is pretty fast, a
few hundred milliseconds. The problem is when the
database is on a server. When I open the database trough
the network this could take several seconds. This is way
to much!
What I wonder is if there are any better ways of filling
my dataset? Maby I can't use Access at all when I open
through a network? Must I use for example MSDE? What do
Microsoft generally say about Access, network and .NET?
Is there any special settings on the server I have to
make?
Thank you
/Raymond
Dim mcn As New OleDbConnection
(Provider=Microsoft.Jet.OLEDB.4.0;Data Source="xxx")
Dim sSQL As String
Dim da As New OleDbDataAdapter
Dim cmd As New OleDbCommand
Dim dtm As DataTableMapping = New DataTableMapping
Dim ds As New Dataset
sSQL = "SELECT * FROM x"
cmd.CommandText = sSQL
cmd.Connection = mcn
dtm.DataSetTable = "x"
dtm.SourceTable = "Table"
da.TableMappings.Add(dtm)
da.SelectCommand = cmd
da.Fill(ds)