PC Review


Reply
Thread Tools Rate Thread

Da.fill(ds); --error

 
 
=?Utf-8?B?ZnJlZGR5?=
Guest
Posts: n/a
 
      5th Jan 2005
Here is my code
string Conn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
c:\\\\G_Drive_Entitlements_STM_2005.xls;" +
"Extended Properties=Excel 8.0;";
OleDbConnection dbConn = new OleDbConnection(Conn);
dbConn.Open ();
OleDbCommand Cmd = new OleDbCommand("Select * From [Sheet1$]", dbConn);
OleDbDataAdapter Da = new OleDbDataAdapter();
Da.SelectCommand = Cmd;
DataSet Ds = new DataSet();
Da.fill(Ds);
dg.DataSource = Ds.Tables[0];
dbConn.Close ();
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      5th Jan 2005
Ok, so what is the error?


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"freddy" <(E-Mail Removed)> wrote in message
news:26FDCD2A-C2B2-436A-92B6-(E-Mail Removed)...
> Here is my code
> string Conn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
> c:\\\\G_Drive_Entitlements_STM_2005.xls;" +
> "Extended Properties=Excel 8.0;";
> OleDbConnection dbConn = new OleDbConnection(Conn);
> dbConn.Open ();
> OleDbCommand Cmd = new OleDbCommand("Select * From [Sheet1$]", dbConn);
> OleDbDataAdapter Da = new OleDbDataAdapter();
> Da.SelectCommand = Cmd;
> DataSet Ds = new DataSet();
> Da.fill(Ds);
> dg.DataSource = Ds.Tables[0];
> dbConn.Close ();



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      5th Jan 2005
freddy <(E-Mail Removed)> wrote:
> Here is my code
> string Conn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
> c:\\\\G_Drive_Entitlements_STM_2005.xls;" +
> "Extended Properties=Excel 8.0;";
> OleDbConnection dbConn = new OleDbConnection(Conn);
> dbConn.Open ();
> OleDbCommand Cmd = new OleDbCommand("Select * From [Sheet1$]", dbConn);
> OleDbDataAdapter Da = new OleDbDataAdapter();
> Da.SelectCommand = Cmd;
> DataSet Ds = new DataSet();
> Da.fill(Ds);
> dg.DataSource = Ds.Tables[0];
> dbConn.Close ();


Okay, now what's the error?

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?ZnJlZGR5?=
Guest
Posts: n/a
 
      5th Jan 2005
error An unhandled exception of type 'System.Data.OleDb.OleDbException'
occurred in system.data.dll

"Jon Skeet [C# MVP]" wrote:

> freddy <(E-Mail Removed)> wrote:
> > Here is my code
> > string Conn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
> > c:\\\\G_Drive_Entitlements_STM_2005.xls;" +
> > "Extended Properties=Excel 8.0;";
> > OleDbConnection dbConn = new OleDbConnection(Conn);
> > dbConn.Open ();
> > OleDbCommand Cmd = new OleDbCommand("Select * From [Sheet1$]", dbConn);
> > OleDbDataAdapter Da = new OleDbDataAdapter();
> > Da.SelectCommand = Cmd;
> > DataSet Ds = new DataSet();
> > Da.fill(Ds);
> > dg.DataSource = Ds.Tables[0];
> > dbConn.Close ();

>
> Okay, now what's the error?
>
> --
> Jon Skeet - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too
>

 
Reply With Quote
 
=?Utf-8?B?ZnJlZGR5?=
Guest
Posts: n/a
 
      5th Jan 2005
error --An unhandled exception of type 'System.Data.OleDb.OleDbException'
occurred in system.data.dll

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Ok, so what is the error?
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "freddy" <(E-Mail Removed)> wrote in message
> news:26FDCD2A-C2B2-436A-92B6-(E-Mail Removed)...
> > Here is my code
> > string Conn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
> > c:\\\\G_Drive_Entitlements_STM_2005.xls;" +
> > "Extended Properties=Excel 8.0;";
> > OleDbConnection dbConn = new OleDbConnection(Conn);
> > dbConn.Open ();
> > OleDbCommand Cmd = new OleDbCommand("Select * From [Sheet1$]", dbConn);
> > OleDbDataAdapter Da = new OleDbDataAdapter();
> > Da.SelectCommand = Cmd;
> > DataSet Ds = new DataSet();
> > Da.fill(Ds);
> > dg.DataSource = Ds.Tables[0];
> > dbConn.Close ();

>
>
>

 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      5th Jan 2005
Look at this ---
c:\\\\G_Drive_Entitlements_STM_2005.xls;"

Even in C# that would mean C:\\G_Drive_Entit...

If fixing that doesn't help, can we see your XLS? Also I assume that your
error is at Da.Fill .

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

"freddy" <(E-Mail Removed)> wrote in message
news:26FDCD2A-C2B2-436A-92B6-(E-Mail Removed)...
> Here is my code
> string Conn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
> c:\\\\G_Drive_Entitlements_STM_2005.xls;" +
> "Extended Properties=Excel 8.0;";
> OleDbConnection dbConn = new OleDbConnection(Conn);
> dbConn.Open ();
> OleDbCommand Cmd = new OleDbCommand("Select * From [Sheet1$]", dbConn);
> OleDbDataAdapter Da = new OleDbDataAdapter();
> Da.SelectCommand = Cmd;
> DataSet Ds = new DataSet();
> Da.fill(Ds);
> dg.DataSource = Ds.Tables[0];
> dbConn.Close ();



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      5th Jan 2005
freddy <(E-Mail Removed)> wrote:
> error An unhandled exception of type 'System.Data.OleDb.OleDbException'
> occurred in system.data.dll


And what's the message in the exception object?

See http://www.pobox.com/~skeet/csharp/complete.html for a good way of
getting answers to problems quickly, rather than requiring several
rounds of question and answer.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      5th Jan 2005
> See http://www.pobox.com/~skeet/csharp/complete.html for a good way of
> getting answers to problems quickly, rather than requiring several
> rounds of question and answer.


<--- Couldn't agree more !!

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik


"Jon Skeet [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> freddy <(E-Mail Removed)> wrote:
> > error An unhandled exception of type 'System.Data.OleDb.OleDbException'
> > occurred in system.data.dll

>
> And what's the message in the exception object?
>
> See http://www.pobox.com/~skeet/csharp/complete.html for a good way of
> getting answers to problems quickly, rather than requiring several
> rounds of question and answer.
>
> --
> Jon Skeet - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill down Error J.W. Aldridge Microsoft Excel Programming 4 22nd May 2009 10:21 PM
Error 424 in Auto Fill KsFireworksGal Microsoft Access Forms 3 16th Jul 2008 10:54 PM
Error in Fill Command Temo Miranda via DotNetMonster.com Microsoft C# .NET 0 18th Feb 2005 09:13 PM
Text fill error =?Utf-8?B?QmxhaXIgUHJvcGVydGllcw==?= Windows XP Help 0 16th Dec 2003 07:11 PM
DataAdapter.fill() causes error yma Microsoft VB .NET 4 14th Dec 2003 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:29 PM.