Click here to Skip to main content
15,883,901 members
Home / Discussions / C#
   

C#

 
GeneralRe: Rename Taskbar Window Titles Pin
C470214-Dec-08 23:46
C470214-Dec-08 23:46 
GeneralRe: Rename Taskbar Window Titles Pin
Tom Deketelaere15-Dec-08 0:04
professionalTom Deketelaere15-Dec-08 0:04 
GeneralRe: Rename Taskbar Window Titles Pin
Luc Pattyn15-Dec-08 0:11
sitebuilderLuc Pattyn15-Dec-08 0:11 
AnswerRe: Rename Taskbar Window Titles Pin
Kristian Sixhøj15-Dec-08 0:12
Kristian Sixhøj15-Dec-08 0:12 
QuestionISAPI Pin
m-khansari14-Dec-08 23:09
m-khansari14-Dec-08 23:09 
AnswerRe: ISAPI Pin
Dave Kreskowiak15-Dec-08 4:12
mveDave Kreskowiak15-Dec-08 4:12 
QuestionADOX problem Pin
Sabry190514-Dec-08 23:03
Sabry190514-Dec-08 23:03 
GeneralRe: ADOX problem Pin
selcuks15-Dec-08 2:41
selcuks15-Dec-08 2:41 
From the code, I understand that you are trying to create table in access from the dataset but your approach is not acceptable for ADOX.

In a similar task, I have tried to export my dataset to an mdb database and I had to construct SQL commands from the dataset to create and insert data. I think this one can give you a starting point.
Here is my create table method:

/// <summary>
/// Constructs the required SQL Query to create the tables in mdb database and then executes the query.
/// </summary>
private void CreateTables()
{
    string sqlCommand = "CREATE TABLE ";
    foreach (DataTable dTable in currentDataSet.Tables)
    {
        string sqlCreate = sqlCommand + dTable.TableName + "(";
        int cnt = 0;
        foreach (DataColumn dColumn in dTable.Columns)
        {
            string sqlCreateCommand = sqlCreate + dColumn.ColumnName;
            if (cnt != dTable.Columns.Count - 1)
            {
                cnt++;
                sqlCreateCommand += GetDataType(dColumn) + ", ";
            }

            if (dTable.Columns.IndexOf(dColumn) == dTable.Columns.Count - 1)
            {
                cnt++;
                sqlCreateCommand += GetDataType(dColumn) + ");";
            }
            sqlCreate = sqlCreateCommand;
        }


        OleDbCommand dbCommand = new OleDbCommand(sqlCreate, (OleDbConnection)dsConnection.CurrentDbConnection);
        dbCommand.ExecuteNonQuery();
    }


Always keep the Murphy Rules in mind!

QuestionDate Pin
ellllllllie14-Dec-08 21:46
ellllllllie14-Dec-08 21:46 
AnswerRe: Date Pin
Christian Graus14-Dec-08 21:59
protectorChristian Graus14-Dec-08 21:59 
GeneralRe: Date Pin
Luc Pattyn15-Dec-08 0:18
sitebuilderLuc Pattyn15-Dec-08 0:18 
QuestionCALLING AN EXE FROM C# CODE Pin
vnr14-Dec-08 20:24
vnr14-Dec-08 20:24 
AnswerRe: CALLING AN EXE FROM C# CODE Pin
Lev Danielyan14-Dec-08 20:30
Lev Danielyan14-Dec-08 20:30 
AnswerRe: CALLING AN EXE FROM C# CODE Pin
Christian Graus14-Dec-08 20:52
protectorChristian Graus14-Dec-08 20:52 
AnswerRe: CALLING AN EXE FROM C# CODE Pin
KarstenK14-Dec-08 20:59
mveKarstenK14-Dec-08 20:59 
QuestionNetworking Pin
yesu prakash14-Dec-08 17:58
yesu prakash14-Dec-08 17:58 
AnswerRe: Networking Pin
Christian Graus14-Dec-08 18:09
protectorChristian Graus14-Dec-08 18:09 
GeneralRe: Networking Pin
yesu prakash14-Dec-08 18:19
yesu prakash14-Dec-08 18:19 
GeneralRe: Networking Pin
Christian Graus14-Dec-08 19:26
protectorChristian Graus14-Dec-08 19:26 
GeneralRe: Networking Pin
yesu prakash14-Dec-08 22:02
yesu prakash14-Dec-08 22:02 
GeneralRe: Networking Pin
Christian Graus14-Dec-08 22:08
protectorChristian Graus14-Dec-08 22:08 
Questionhow to send two responses to one request Pin
prasadbuddhika14-Dec-08 17:44
prasadbuddhika14-Dec-08 17:44 
AnswerRe: how to send two responses to one request Pin
Christian Graus14-Dec-08 17:52
protectorChristian Graus14-Dec-08 17:52 
GeneralRe: how to send two responses to one request Pin
prasadbuddhika14-Dec-08 18:09
prasadbuddhika14-Dec-08 18:09 
GeneralRe: how to send two responses to one request Pin
prasadbuddhika14-Dec-08 18:38
prasadbuddhika14-Dec-08 18:38 

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.