Click here to Skip to main content
15,887,392 members
Home / Discussions / C#
   

C#

 
QuestionConsuming a Delphi COM EXE in Visual Studio C# App Pin
alias4713-Aug-07 14:59
alias4713-Aug-07 14:59 
Questionhow to detect remote input in c#? Pin
Inam Jameel13-Aug-07 13:29
Inam Jameel13-Aug-07 13:29 
AnswerRe: how to detect remote input in c#? Pin
Liam O'Hagan13-Aug-07 20:32
Liam O'Hagan13-Aug-07 20:32 
QuestionHtmlEncode Pin
vfhgujaqwe13-Aug-07 12:02
vfhgujaqwe13-Aug-07 12:02 
AnswerRe: HtmlEncode Pin
Christian Graus13-Aug-07 13:38
protectorChristian Graus13-Aug-07 13:38 
QuestionConverting Excel File to XML Pin
T4AMD13-Aug-07 9:47
T4AMD13-Aug-07 9:47 
AnswerRe: Converting Excel File to XML Pin
pmarfleet13-Aug-07 10:09
pmarfleet13-Aug-07 10:09 
QuestionRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 10:24
T4AMD13-Aug-07 10:24 
Hi Paul,
Thank You so much for replying. Now the Contacts error does not show up but
I get an error on the following code:
OleDbadpSource.Fill(dsSource);//The error says OleDbException was unhandled by user code. Don't know what that means


My full code is as follows:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
BindData();
}

private void BindData()
{

DataSet dsLoginSourceGrid = GetLoginDataSet();

GridView1.DataSource = dsLoginSourceGrid.Tables[0];
GridView1.DataBind();

}

private string GetConnectionString()
{
string strConnectionString = ConfigurationManager.ConnectionStrings["ExcelConnectionString"].ToString();
return strConnectionString;

}

private DataSet GetLoginDataSet()
{
string ConnectionString = GetConnectionString();
OleDbConnection sqlconSource = new OleDbConnection(ConnectionString);

OleDbCommand OleDbcmdSource = new OleDbCommand();
OleDbcmdSource.Connection = sqlconSource;
OleDbcmdSource.CommandType = CommandType.Text;

OleDbcmdSource.CommandText = "SELECT * FROM [Contacts$]";

OleDbDataAdapter OleDbadpSource = new OleDbDataAdapter(OleDbcmdSource);
OleDbadpSource.SelectCommand = OleDbcmdSource;

DataSet dsSource = new DataSet();
OleDbadpSource.Fill(dsSource);

return dsSource;

}


}

AnswerRe: Converting Excel File to XML Pin
pmarfleet13-Aug-07 10:37
pmarfleet13-Aug-07 10:37 
QuestionRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 10:42
T4AMD13-Aug-07 10:42 
AnswerRe: Converting Excel File to XML Pin
pmarfleet13-Aug-07 10:46
pmarfleet13-Aug-07 10:46 
AnswerRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 10:49
T4AMD13-Aug-07 10:49 
GeneralRe: Converting Excel File to XML Pin
pmarfleet13-Aug-07 10:57
pmarfleet13-Aug-07 10:57 
QuestionRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 11:03
T4AMD13-Aug-07 11:03 
AnswerRe: Converting Excel File to XML Pin
pmarfleet13-Aug-07 11:15
pmarfleet13-Aug-07 11:15 
QuestionRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 11:26
T4AMD13-Aug-07 11:26 
QuestionRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 11:39
T4AMD13-Aug-07 11:39 
QuestionRe: Converting Excel File to XML Pin
T4AMD13-Aug-07 13:15
T4AMD13-Aug-07 13:15 
AnswerRe: Converting Excel File to XML Pin
pmarfleet13-Aug-07 21:52
pmarfleet13-Aug-07 21:52 
QuestionRuntime Class Declaration Pin
mfcuser13-Aug-07 9:43
mfcuser13-Aug-07 9:43 
AnswerRe: Runtime Class Declaration Pin
mfcuser13-Aug-07 10:21
mfcuser13-Aug-07 10:21 
GeneralRe: Runtime Class Declaration Pin
PhilDanger13-Aug-07 11:08
PhilDanger13-Aug-07 11:08 
Question[C#] - Linking the designer and Form Pin
aravinda77713-Aug-07 9:35
aravinda77713-Aug-07 9:35 
AnswerRe: [C#] - Linking the designer and Form Pin
Hessam Jalali13-Aug-07 10:14
Hessam Jalali13-Aug-07 10:14 
GeneralRe: [C#] - Linking the designer and Form Pin
Scott Dorman13-Aug-07 10:26
professionalScott Dorman13-Aug-07 10:26 

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.