Click here to Skip to main content
15,923,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Two interfaces with same function name [modified] Pin
DaveyM6925-Mar-09 2:24
professionalDaveyM6925-Mar-09 2:24 
GeneralRe: Two interfaces with same function name Pin
.NET- India 25-Mar-09 2:35
.NET- India 25-Mar-09 2:35 
Generallazy Pin
Luc Pattyn25-Mar-09 3:13
sitebuilderLuc Pattyn25-Mar-09 3:13 
GeneralRe: Two interfaces with same function name Pin
DaveyM6925-Mar-09 3:22
professionalDaveyM6925-Mar-09 3:22 
GeneralRe: Two interfaces with same function name Pin
S. Senthil Kumar25-Mar-09 5:46
S. Senthil Kumar25-Mar-09 5:46 
GeneralRe: Two interfaces with same function name Pin
DaveyM6925-Mar-09 6:42
professionalDaveyM6925-Mar-09 6:42 
GeneralRe: Two interfaces with same function name Pin
King Julien25-Mar-09 0:48
King Julien25-Mar-09 0:48 
QuestionFill combo box from excel Pin
shantanusenin24-Mar-09 22:48
shantanusenin24-Mar-09 22:48 
I want to fill combo box with the values in Excel usind ADO.NET and C# i have written a code bit its not working. Kindly help.

private void FillAccounts()
{
try
{
string excelFile = @"C:\Capacity Planning\Accounts.xls";
//String sConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + @"C:\Capacity Planning\Accounts.xls" + ";Extended Properties=Excel 12.0 Xml;HDR=YES;:Max Buffer Size=256;";
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + excelFile + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'";



OleDbConnection objConn = new OleDbConnection(sConnectionString);

objConn.Open();

OleDbCommand objCmdSelect = new OleDbCommand("SELECT Account,Link FROM [Accounts$]", objConn);

OleDbDataAdapter objAdapter = new OleDbDataAdapter();

objAdapter.SelectCommand = objCmdSelect;

DataSet objDataset = new DataSet();

objAdapter.Fill(objDataset);

cbAccounts.DataSource = objDataset.Tables["Accounts"];

cbAccounts.DisplayMember = "Account";

cbAccounts.ValueMember = "Accounts.Account";

objConn.Close();
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}


Thanks a lot in advance
shantanu Smile | :) Thumbs Up | :thumbsup:
QuestionDataGridView Save changes cell only after leaving the row ? Pin
unitecsoft24-Mar-09 22:30
unitecsoft24-Mar-09 22:30 
AnswerRe: DataGridView Save changes cell only after leaving the row ? Pin
Eddy Vluggen24-Mar-09 22:54
professionalEddy Vluggen24-Mar-09 22:54 
GeneralRe: DataGridView Save changes cell only after leaving the row ? Pin
unitecsoft24-Mar-09 22:59
unitecsoft24-Mar-09 22:59 
GeneralRe: DataGridView Save changes cell only after leaving the row ? Pin
Eddy Vluggen24-Mar-09 23:34
professionalEddy Vluggen24-Mar-09 23:34 
GeneralRe: DataGridView Save changes cell only after leaving the row ? Pin
unitecsoft25-Mar-09 0:52
unitecsoft25-Mar-09 0:52 
GeneralRe: DataGridView Save changes cell only after leaving the row ? Pin
Eddy Vluggen25-Mar-09 5:32
professionalEddy Vluggen25-Mar-09 5:32 
QuestionPaths in Crystal... Pin
Stephen Lintott24-Mar-09 21:29
Stephen Lintott24-Mar-09 21:29 
AnswerRe: Paths in Crystal... Pin
Stephen Lintott24-Mar-09 22:41
Stephen Lintott24-Mar-09 22:41 
Questionplz help Pin
grkrishna24-Mar-09 21:14
grkrishna24-Mar-09 21:14 
AnswerRe: plz help Pin
SeMartens24-Mar-09 21:17
SeMartens24-Mar-09 21:17 
GeneralRe: plz help Pin
grkrishna24-Mar-09 22:20
grkrishna24-Mar-09 22:20 
GeneralRe: plz help Pin
Pete O'Hanlon24-Mar-09 22:36
mvePete O'Hanlon24-Mar-09 22:36 
QuestionHow to save image in a folder? and how to show image in a picturebox with windows project by C# language Pin
Rahad Rahman24-Mar-09 20:34
professionalRahad Rahman24-Mar-09 20:34 
AnswerRe: How to save image in a folder? and how to show image in a picturebox with windows project by C# language PinPopular
Christian Graus24-Mar-09 20:43
protectorChristian Graus24-Mar-09 20:43 
GeneralRe: How to save image in a folder? and how to show image in a picturebox with windows project by C# language Pin
Luc Pattyn25-Mar-09 3:14
sitebuilderLuc Pattyn25-Mar-09 3:14 
AnswerRe: How to save image in a folder? and how to show image in a picturebox with windows project by C# language Pin
Xmen Real 24-Mar-09 20:53
professional Xmen Real 24-Mar-09 20:53 
AnswerRe: How to save image in a folder? and how to show image in a picturebox with windows project by C# language Pin
0x3c024-Mar-09 21:05
0x3c024-Mar-09 21:05 

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.