Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to show image in ListView ColumnHeader Pin
TJoe26-Nov-07 2:07
TJoe26-Nov-07 2:07 
Questionenable the menus Pin
keyto25-Nov-07 22:27
keyto25-Nov-07 22:27 
AnswerRe: enable the menus Pin
Pete O'Hanlon25-Nov-07 23:48
mvePete O'Hanlon25-Nov-07 23:48 
Questionhow to ZIP and UNZIP in C# Pin
E_Gold25-Nov-07 22:19
E_Gold25-Nov-07 22:19 
AnswerRe: how to ZIP and UNZIP in C# Pin
VenkataRamana.Gali25-Nov-07 22:37
VenkataRamana.Gali25-Nov-07 22:37 
AnswerRe: how to ZIP and UNZIP in C# Pin
Martin#25-Nov-07 22:55
Martin#25-Nov-07 22:55 
AnswerRe: how to ZIP and UNZIP in C# Pin
Sandeep Kumar25-Nov-07 23:38
Sandeep Kumar25-Nov-07 23:38 
QuestionUpdating multiple base data Pin
Nitin.raj25-Nov-07 22:13
Nitin.raj25-Nov-07 22:13 
hi,

I have fetched two database tables "MTQABenchMarks" and "Users" in the datagridview. This is a windows application. Now I have to update the "MTQABenchMark" database after making changes to the datatable present in the application. When I run the code it is throwing an exception "Dynamic SQL generation is not supported against multiple base tables." How to solve this. the code is

public Form1()
{
InitializeComponent();
}
static SqlConnection Con = new SqlConnection("Data Source= 192.168.100.234; Initial Catalog=gishyd; User ID=sa; password=gis*2005");

SqlDataAdapter Da = new SqlDataAdapter("SELECT dbo.Users.UserID, dbo.MTQABenchMark.Id as EmpID, dbo.Users.FirstName + ' ' + dbo.Users.LastName AS Name, dbo.MTQABenchMark.NoofMinPerDay,dbo.MTQABenchMark.PerMonth FROM dbo.Users INNER JOIN dbo.MTQABenchMark ON dbo.Users.UserID = dbo.MTQABenchMark.EID ", Con);
DataSet Ds = new DataSet();

private void Form1_Load(object sender, EventArgs e)
{
Da.Fill(Ds, "MTQABenchMark");
dataGridView1.DataSource = Ds.Tables["MTQABenchMark"];
}

private void button2_Click(object sender, EventArgs e)
{
SqlCommandBuilder CmdBld = new SqlCommandBuilder(Da);

Da.InsertCommand = CmdBld.GetInsertCommand();
Da.Update(Ds, "MTQABenchMark");

MessageBox.Show(" Database is Updated");
}

}
}

Please Help.


Nitin Raj Bidkikar


Nitin Raj Bidkikar

AnswerRe: Updating multiple base data Pin
Aftab Sindhi26-Nov-07 5:07
Aftab Sindhi26-Nov-07 5:07 
QuestionWindows service Pin
dan!sh 25-Nov-07 22:03
professional dan!sh 25-Nov-07 22:03 
AnswerRe: Windows service Pin
schoetbi26-Nov-07 10:35
schoetbi26-Nov-07 10:35 
Questionhow i can connect useres to the databas [modified] Pin
yemen_programmer25-Nov-07 21:41
yemen_programmer25-Nov-07 21:41 
AnswerRe: how i can connect useres to the databas Pin
Pete O'Hanlon25-Nov-07 21:49
mvePete O'Hanlon25-Nov-07 21:49 
AnswerRe: how i can connect useres to the databas Pin
Christian Graus25-Nov-07 21:49
protectorChristian Graus25-Nov-07 21:49 
QuestionDropdownlist Pin
minniemooo25-Nov-07 21:07
minniemooo25-Nov-07 21:07 
AnswerRe: Dropdownlist Pin
Christian Graus25-Nov-07 21:31
protectorChristian Graus25-Nov-07 21:31 
QuestionHow to add Combobox's item Pin
jason_mf25-Nov-07 21:00
jason_mf25-Nov-07 21:00 
AnswerRe: How to add Combobox's item Pin
Pankaj - Joshi25-Nov-07 21:15
Pankaj - Joshi25-Nov-07 21:15 
QuestionC# 2.0 grammar needed Pin
aravinda77725-Nov-07 20:57
aravinda77725-Nov-07 20:57 
AnswerRe: C# 2.0 grammar needed Pin
pmarfleet25-Nov-07 22:03
pmarfleet25-Nov-07 22:03 
Questioncall the store procedure Pin
ghanavat25-Nov-07 20:16
ghanavat25-Nov-07 20:16 
AnswerRe: call the store procedure Pin
Nouman Bhatti25-Nov-07 20:43
Nouman Bhatti25-Nov-07 20:43 
QuestionHelp in windows service Pin
Prabhat00325-Nov-07 20:06
Prabhat00325-Nov-07 20:06 
AnswerRe: Help in windows service Pin
mav.northwind25-Nov-07 20:19
mav.northwind25-Nov-07 20:19 
Questionconversion Pin
trilokharry25-Nov-07 18:36
trilokharry25-Nov-07 18:36 

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.