Click here to Skip to main content
14,689,618 members
Home » Discussions » C#
   

C#

 
GeneralRe: Cannot pass params! Any ideas? Pin
FruitBatInShades29-Jul-08 23:47
MemberFruitBatInShades29-Jul-08 23:47 
QuestionRe: Cannot pass params! Any ideas? Pin
Luc Pattyn29-Jul-08 4:11
sitebuilderLuc Pattyn29-Jul-08 4:11 
QuestionHttp traffic from IE Pin
George_George29-Jul-08 3:31
MemberGeorge_George29-Jul-08 3:31 
AnswerRe: Http traffic from IE Pin
J4amieC29-Jul-08 3:45
MemberJ4amieC29-Jul-08 3:45 
GeneralRe: Http traffic from IE Pin
George_George29-Jul-08 4:15
MemberGeorge_George29-Jul-08 4:15 
QuestionDynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 3:20
MemberMumbleB29-Jul-08 3:20 
AnswerRe: Dynamically Add Columns to Existing DataTable [modified] Pin
paas29-Jul-08 4:02
Memberpaas29-Jul-08 4:02 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 4:08
MemberMumbleB29-Jul-08 4:08 
Hi pass. It didn't. I still don't get the Column created. I have changed the code as follows. I'm not sure if I am selecting the column.

private void btnAddColumn_Click(object sender, EventArgs e)
{
    conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source = T:\Nasmeea\PSSZ.mdb";
    conn.Open();
    DataAdapter = new OleDbDataAdapter("Select * From [DivInfo]", conn);
    DataColumn dValue = new DataColumn();
    DataTable dataTable = new DataTable("[DivInfo]");
    dValue.ColumnName = txtboxColumns.Text.ToString();
    dValue.DataType = Type.GetType("System.String");
    dataTable.Columns.Add(dValue);
    dataTable.AcceptChanges();
    conn.Close();
    MessageBox.Show("Column Added");
}


Now, within the Database PSSZ.MDB i have an existing table called DivInfo. Am I connecting correctly to the database and dataTable in the above code? Sorry, should probably have also said that I have taken the code from a sample on the web but they don't mention any of the connection strings etc.

Excellence is doing ordinary things extraordinarily well.

GeneralRe: Dynamically Add Columns to Existing DataTable Pin
paas29-Jul-08 4:10
Memberpaas29-Jul-08 4:10 
AnswerRe: Dynamically Add Columns to Existing DataTable [modified] Pin
Tuwing.Sabado29-Jul-08 4:07
MemberTuwing.Sabado29-Jul-08 4:07 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 4:23
MemberMumbleB29-Jul-08 4:23 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
Tuwing.Sabado29-Jul-08 4:35
MemberTuwing.Sabado29-Jul-08 4:35 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 10:50
MemberMumbleB29-Jul-08 10:50 
AnswerRe: Dynamically Add Columns to Existing DataTable Pin
J a a n s29-Jul-08 4:12
professionalJ a a n s29-Jul-08 4:12 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 4:29
MemberMumbleB29-Jul-08 4:29 
GeneralRe: Dynamically Add Columns to Existing DataTable [modified] Pin
Tuwing.Sabado29-Jul-08 4:43
MemberTuwing.Sabado29-Jul-08 4:43 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 10:53
MemberMumbleB29-Jul-08 10:53 
GeneralRe: Dynamically Add Columns to Existing DataTable Pin
MumbleB29-Jul-08 20:21
MemberMumbleB29-Jul-08 20:21 
Questionauto select, insert, update, delete ... option in winforms Pin
dream_liner_7e729-Jul-08 2:56
Memberdream_liner_7e729-Jul-08 2:56 
AnswerRe: auto select, insert, update, delete ... option in winforms Pin
Tuwing.Sabado29-Jul-08 4:16
MemberTuwing.Sabado29-Jul-08 4:16 
QuestionAxInterop.xyz.dll deployment problem Pin
Krazy Programmer29-Jul-08 2:34
MemberKrazy Programmer29-Jul-08 2:34 
AnswerRe: AxInterop.xyz.dll deployment problem Pin
paas29-Jul-08 5:17
Memberpaas29-Jul-08 5:17 
QuestionIs there a collection in .NET that combines the functionality of both a List and a Dictionary? Pin
Waleed Eissa29-Jul-08 1:24
MemberWaleed Eissa29-Jul-08 1:24 
AnswerRe: Is there a collection in .NET that combines the functionality of both a List and a Dictionary? Pin
Guffa29-Jul-08 1:48
MemberGuffa29-Jul-08 1:48 
AnswerRe: Is there a collection in .NET that combines the functionality of both a List and a Dictionary? Pin
Frank Horn29-Jul-08 3:17
MemberFrank Horn29-Jul-08 3:17 

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.