Click here to Skip to main content
16,011,647 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: VS2005 and VS2003 body layout Pin
Christian Graus3-Mar-08 17:22
protectorChristian Graus3-Mar-08 17:22 
GeneralGive Idea to Hosting ASP.Net Pages Pin
Senthil S3-Mar-08 15:06
Senthil S3-Mar-08 15:06 
GeneralRe: Give Idea to Hosting ASP.Net Pages Pin
Christian Graus3-Mar-08 15:55
protectorChristian Graus3-Mar-08 15:55 
GeneralRe: Give Idea to Hosting ASP.Net Pages Pin
Dinuj Nath3-Mar-08 15:58
Dinuj Nath3-Mar-08 15:58 
Generaldeclaring connnectionString need help Pin
blackzz3-Mar-08 9:29
blackzz3-Mar-08 9:29 
GeneralRe: declaring connnectionString need help Pin
pmarfleet3-Mar-08 10:03
pmarfleet3-Mar-08 10:03 
GeneralRe: declaring connnectionString need help Pin
P Tagore Srinivas Dhanunjay3-Mar-08 16:13
P Tagore Srinivas Dhanunjay3-Mar-08 16:13 
QuestionProblems populating my Grid View control with Excel data Pin
Apples3-Mar-08 7:55
Apples3-Mar-08 7:55 
In my web.config, I have this connection string:

<add name="ExcelConnection" connectionString="Provider=Microsoft.Jet.Oledb.4.0;Data Source=C:\Documents and Settings\Steven\My Documents\example.xls;Extended Properties=Excel 8.0"/>

In my code file, I have this code to open the connection, and put the data in a Grid View control.


string connstr = System.Configuration.ConfigurationManager.ConnectionStrings["ExcelConnection"].ToString();
OleDbConnection conn = new OleDbConnection(connstr);

string strSQL = "SELECT * FROM [Time$]";


conn.Open();
OleDbCommand cmd = new OleDbCommand(strSQL, conn);
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);

da.Fill(ds);

GridView1.DataSource = ds;
GridView1.DataBind();
conn.Close();

When I try to run it, it gives me this error:

The Microsoft Jet database engine could not find the object 'Time$'. Make sure the object exists and that you spell its name and the path name correctly.

Everything looks fine to me, does anyone know what the problem is?
GeneralRe: Problems populating my Grid View control with Excel data Pin
Christian Graus3-Mar-08 9:07
protectorChristian Graus3-Mar-08 9:07 
GeneralRe: Problems populating my Grid View control with Excel data Pin
Apples3-Mar-08 10:01
Apples3-Mar-08 10:01 
GeneralRe: Problems populating my Grid View control with Excel data Pin
RCoate3-Mar-08 12:06
RCoate3-Mar-08 12:06 
GeneralSorting information on a GridView column just by pressing the column header Pin
cosmoteco3-Mar-08 4:51
cosmoteco3-Mar-08 4:51 
GeneralRe: Sorting information on a GridView column just by pressing the column header Pin
eyeseetee3-Mar-08 4:57
eyeseetee3-Mar-08 4:57 
GeneralRe: Sorting information on a GridView column just by pressing the column header Pin
cosmoteco3-Mar-08 5:34
cosmoteco3-Mar-08 5:34 
GeneralRe: Sorting information on a GridView column just by pressing the column header Pin
cosmoteco3-Mar-08 23:59
cosmoteco3-Mar-08 23:59 
GeneralGetting the data from database and putting in label Pin
laziale3-Mar-08 4:38
laziale3-Mar-08 4:38 
GeneralRe: Getting the data from database and putting in label Pin
eyeseetee3-Mar-08 4:51
eyeseetee3-Mar-08 4:51 
GeneralRe: Getting the data from database and putting in label Pin
laziale3-Mar-08 4:59
laziale3-Mar-08 4:59 
GeneralRe: Getting the data from database and putting in label Pin
eyeseetee3-Mar-08 5:02
eyeseetee3-Mar-08 5:02 
Generalusing DataBindings.Add in ASP.NET with C# Pin
laziale3-Mar-08 4:37
laziale3-Mar-08 4:37 
GeneralRe: using DataBindings.Add in ASP.NET with C# Pin
manishsaiin3-Mar-08 20:54
manishsaiin3-Mar-08 20:54 
Generalget a simple value from a GridView Pin
caradri3-Mar-08 4:26
caradri3-Mar-08 4:26 
GeneralRe: get a simple value from a GridView Pin
eyeseetee3-Mar-08 4:54
eyeseetee3-Mar-08 4:54 
GeneralRe: get a simple value from a GridView Pin
caradri3-Mar-08 5:34
caradri3-Mar-08 5:34 
GeneralRe: get a simple value from a GridView Pin
eyeseetee3-Mar-08 21:20
eyeseetee3-Mar-08 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.