Click here to Skip to main content
15,924,195 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionXML Upload Pin
rockyl2-Apr-07 2:59
rockyl2-Apr-07 2:59 
AnswerRe: XML Upload Pin
gauthee2-Apr-07 3:12
gauthee2-Apr-07 3:12 
GeneralRe: XML Upload Pin
rockyl2-Apr-07 3:38
rockyl2-Apr-07 3:38 
GeneralRe: XML Upload Pin
badgrs2-Apr-07 5:26
badgrs2-Apr-07 5:26 
GeneralRe: XML Upload Pin
rockyl2-Apr-07 21:07
rockyl2-Apr-07 21:07 
AnswerRe: XML Upload Pin
Nicejith2-Apr-07 20:10
Nicejith2-Apr-07 20:10 
GeneralRe: XML Upload Pin
rockyl2-Apr-07 21:04
rockyl2-Apr-07 21:04 
GeneralRe: XML Upload Pin
rockyl11-Apr-07 2:15
rockyl11-Apr-07 2:15 
I have implemented your suggestion, but facing some issues:
Below is the code I have used:
protected void Button1_Click(object sender, EventArgs e)
{

string path = @"D:\emp.xml";
string dsTable = "";
string connectionString = @"Server = DB\SQL2; Database = CWBDB; user = sa; password = sa";
DataSet ds = new DataSet("EMPDS");
ds.ReadXml(path);
foreach (DataTable t in ds.Tables)
{
dsTable = t.ToString();
}
SqlConnection con = new SqlConnection(connectionString);
SqlDataAdapter da = new SqlDataAdapter();
da.TableMappings.Add("EMP", dsTable);
if ((da.Update(ds))>0)
{
Label1.Text = "Uploaded the data successfully";
}
else
{
Label1.Text = "Could not Upload the data";
}
}

But I see an exception:
"Update unable to find TableMapping['Table'] or DataTable 'Table'."

Please let me know what needs to be done for this!

Rakesh

QuestionDisplaying details in a penel from gridview Pin
Imthu2-Apr-07 2:46
Imthu2-Apr-07 2:46 
AnswerRe: Displaying details in a penel from gridview Pin
kubben2-Apr-07 3:19
kubben2-Apr-07 3:19 
Questionredirect to google search Pin
iamdking2-Apr-07 2:37
iamdking2-Apr-07 2:37 
AnswerRe: redirect to google search Pin
gauthee2-Apr-07 3:05
gauthee2-Apr-07 3:05 
Questiongenerating serial number in gridview Pin
Imthu2-Apr-07 2:33
Imthu2-Apr-07 2:33 
AnswerRe: generating serial number in gridview Pin
Smitha Appukuttan2-Apr-07 2:54
Smitha Appukuttan2-Apr-07 2:54 
AnswerRe: generating serial number in gridview Pin
faiqshah2-Apr-07 7:47
faiqshah2-Apr-07 7:47 
QuestionSaving connections & Scope Pin
TimGee2-Apr-07 2:07
TimGee2-Apr-07 2:07 
AnswerRe: Saving connections & Scope Pin
kubben2-Apr-07 3:05
kubben2-Apr-07 3:05 
GeneralRe: Saving connections & Scope Pin
TimGee2-Apr-07 3:14
TimGee2-Apr-07 3:14 
QuestionDeleting registered users Pin
draksa2-Apr-07 1:50
draksa2-Apr-07 1:50 
AnswerRe: Deleting registered users Pin
kubben2-Apr-07 3:10
kubben2-Apr-07 3:10 
AnswerRe: Deleting registered users Pin
szukuro2-Apr-07 3:58
szukuro2-Apr-07 3:58 
Questionhow to connect ASP.net and COM+ Pin
Sylvester george2-Apr-07 1:33
Sylvester george2-Apr-07 1:33 
QuestionRequired Field Validator Pin
Kushi Bobby2-Apr-07 1:32
Kushi Bobby2-Apr-07 1:32 
AnswerRe: Required Field Validator Pin
icestatue2-Apr-07 3:01
icestatue2-Apr-07 3:01 
QuestionWrong time shown in codeproject Pin
tonymathewt2-Apr-07 0:50
professionaltonymathewt2-Apr-07 0:50 

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.