Click here to Skip to main content
15,921,793 members
Home / Discussions / C#
   

C#

 
GeneralRe: Events from c# DLL not visible in VB7 project (Visual Studio 2008) Pin
hoernchenmeister3-Mar-10 5:49
hoernchenmeister3-Mar-10 5:49 
QuestionUnicode Pin
Maninandan2-Mar-10 21:18
Maninandan2-Mar-10 21:18 
QuestionFind a word using regular expression in c# Pin
PeriyasamyRamachandran2-Mar-10 19:48
PeriyasamyRamachandran2-Mar-10 19:48 
AnswerRe: Find a word using regular expression in c# Pin
sanforjackass2-Mar-10 19:51
sanforjackass2-Mar-10 19:51 
AnswerRe: Find a word using regular expression in c# Pin
Arindam Tewary2-Mar-10 20:26
professionalArindam Tewary2-Mar-10 20:26 
GeneralRe: Find a word using regular expression in c# Pin
PeriyasamyRamachandran2-Mar-10 20:28
PeriyasamyRamachandran2-Mar-10 20:28 
Questiondatagridviewrow conversion Pin
Member 5903102-Mar-10 19:28
Member 5903102-Mar-10 19:28 
Questionhow to write to a specific range in excel ? [modified] Pin
tonyonlinux2-Mar-10 19:15
tonyonlinux2-Mar-10 19:15 
For some reason this code is not writing to my excel file and I can't figure out why.
I have a premade template and it has a worksheet in it called bsheet and I also took and selected my range and hit insert/name and gave it the name btable

I then put this in a button click event to test but the xls is not effected what might i be doing wrong?
private void button1_Click(object sender, EventArgs e)
        {
            string connectionString = "Provider=Microsoft.Jet.OleDb.4.0; data source=c:\\BookList.xls; Extended Properties=Excel 8.0;";
            string selectString = "INSERT INTO btable VALUES('12345′, 'Acme Inc', 'Acme Way', 'CA')";

            OleDbConnection con = new OleDbConnection(connectionString);
            OleDbCommand cmd = new OleDbCommand(selectString, con);

            try
            {
                con.Open();
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                con.Dispose();
            }
        }
modified on Wednesday, March 3, 2010 1:52 PM

AnswerRe: how to write to a specific range in excel ? Pin
tonyonlinux3-Mar-10 8:22
tonyonlinux3-Mar-10 8:22 
QuestionC# win application with web-browser control HANGS after some time Pin
BalajiRamasamy2-Mar-10 18:55
BalajiRamasamy2-Mar-10 18:55 
AnswerRe: C# win application with web-browser control HANGS after some time Pin
Saksida Bojan2-Mar-10 19:06
Saksida Bojan2-Mar-10 19:06 
GeneralRe: C# win application with web-browser control HANGS after some time Pin
BalajiRamasamy2-Mar-10 19:19
BalajiRamasamy2-Mar-10 19:19 
AnswerRe: C# win application with web-browser control HANGS after some time Pin
Luc Pattyn3-Mar-10 1:57
sitebuilderLuc Pattyn3-Mar-10 1:57 
Questiondatagridview insertion Pin
Member 5903102-Mar-10 18:21
Member 5903102-Mar-10 18:21 
AnswerMessage Closed Pin
2-Mar-10 18:35
stancrm2-Mar-10 18:35 
GeneralRe: datagridview insertion Pin
Member 5903102-Mar-10 18:37
Member 5903102-Mar-10 18:37 
AnswerRe: datagridview insertion Pin
Arindam Tewary2-Mar-10 20:16
professionalArindam Tewary2-Mar-10 20:16 
QuestionHow to Create Virtual Drive? Pin
Pawan Kiran2-Mar-10 18:17
Pawan Kiran2-Mar-10 18:17 
AnswerRe: How to Create Virtual Drive? Pin
Saksida Bojan2-Mar-10 18:42
Saksida Bojan2-Mar-10 18:42 
GeneralRe: How to Create Virtual Drive? Pin
Pawan Kiran2-Mar-10 18:57
Pawan Kiran2-Mar-10 18:57 
GeneralRe: How to Create Virtual Drive? Pin
Saksida Bojan2-Mar-10 19:00
Saksida Bojan2-Mar-10 19:00 
QuestionMessage Removed Pin
2-Mar-10 9:09
Kennebel2-Mar-10 9:09 
AnswerRe: WPF Nested Grid Sizing Pin
AspDotNetDev2-Mar-10 17:12
protectorAspDotNetDev2-Mar-10 17:12 
GeneralRe: WPF Nested Grid Sizing Pin
Kennebel3-Mar-10 3:13
Kennebel3-Mar-10 3:13 
QuestionNot sure why second Access Rule is required for User account write access Pin
CTaylor892-Mar-10 8:31
CTaylor892-Mar-10 8:31 

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.