D
D
I am experiencing slow response from my fill command.
I am trying to open a database and one table and add data at some point.
Is there a way to just open the table without all the data being read in
when using my fill on my dataadapter.
Is there a more efficient way to instantiate my dataadpter
Below is my code:
Thanks
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Common;
using System.Data.Odbc;
using System.Collections;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
OdbcConnection dbconn = new
OdbcConnection("Provider=MSDASQL.1;DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\\hedgefunds\\db1.mdb;DATABASE=db1;UID=root;PWD=;
OPTION=1;");
dbconn.Open();
OdbcDataAdapter dbrs = new OdbcDataAdapter("Select * From
MyTable;", dbconn);
OdbcCommandBuilder builder = new OdbcCommandBuilder(dbrs);
DataSet dbADOrs = new DataSet();
InitializeComponent();
dbrs.MissingSchemaAction = MissingSchemaAction.AddWithKey;
dbrs.Fill(dbADOrs);
OpenReturnFile(dbrs, dbADOrs);
}
I am trying to open a database and one table and add data at some point.
Is there a way to just open the table without all the data being read in
when using my fill on my dataadapter.
Is there a more efficient way to instantiate my dataadpter
Below is my code:
Thanks
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Common;
using System.Data.Odbc;
using System.Collections;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
OdbcConnection dbconn = new
OdbcConnection("Provider=MSDASQL.1;DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\\hedgefunds\\db1.mdb;DATABASE=db1;UID=root;PWD=;
OPTION=1;");
dbconn.Open();
OdbcDataAdapter dbrs = new OdbcDataAdapter("Select * From
MyTable;", dbconn);
OdbcCommandBuilder builder = new OdbcCommandBuilder(dbrs);
DataSet dbADOrs = new DataSet();
InitializeComponent();
dbrs.MissingSchemaAction = MissingSchemaAction.AddWithKey;
dbrs.Fill(dbADOrs);
OpenReturnFile(dbrs, dbADOrs);
}