Copy from dataset to access table in C#? -


i have dataset (from xml file), want read schema , values dataset , copy access table.

i want create access database on fly (can use adox), create access table (from adox) create schema in table , copy values dataset table.

i getting error when try create table , add columns in it, below code snippet giving me error

      dataset ds = new dataset();       console.write("the name is" + filename.text.tostring());       ds.readxml("file_path" + filename.text.tostring());         adox.catalog cat = new catalog();       cat.create("provider=microsoft.jet.oledb.4.0;data source='database_name';jet oledb:engine type=5");        table tab = new table();       tab.columns.append("column name", datatypeenum.advarchar, 50); 

// inserting 32 more columns in manner

      cat.tables.append(tab); 

when run code block com exception : "tableid invalid".

am trying right approach? how can copy values dataset table?

could try assign name table?

tab.tablename = "myname"; 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -