Click here to Skip to main content
16,020,182 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to remote copy ? Pin
Rob Graham8-Apr-07 3:52
Rob Graham8-Apr-07 3:52 
QuestionHow to use IsampleGrabber interface in C#? Pin
Khoramdin7-Apr-07 21:43
Khoramdin7-Apr-07 21:43 
AnswerRe: How to use IsampleGrabber interface in C#? Pin
Colin Angus Mackay8-Apr-07 1:18
Colin Angus Mackay8-Apr-07 1:18 
AnswerRe: How to use IsampleGrabber interface in C#? Pin
Sathesh Sakthivel8-Apr-07 1:23
Sathesh Sakthivel8-Apr-07 1:23 
QuestionHelp Pls - Updating Access DB from DataSet - DataAdapter.Update problem Pin
esulin7-Apr-07 19:31
esulin7-Apr-07 19:31 
AnswerRe: Help Pls - Updating Access DB from DataSet - DataAdapter.Update problem Pin
Muammar©7-Apr-07 20:55
Muammar©7-Apr-07 20:55 
GeneralRe: Help Pls - Updating Access DB from DataSet - DataAdapter.Update problem Pin
esulin7-Apr-07 22:06
esulin7-Apr-07 22:06 
AnswerRe: Help Pls - Updating Access DB from DataSet - DataAdapter.Update problem Pin
phantanagu8-Apr-07 22:25
phantanagu8-Apr-07 22:25 
I have a small code like this
private DataTable getData (string sql, sqlConnection con){
{
DataTable tempdt = new DataTable();
try {
sqlDataTableAdapter adap = new sqlDataTableAdapter(sql,con);
adapt.Fill(tempdt);
}
return tempdt;
}

private bool saveData(string sql, sqlConnection con, DataTable dt)
{
sqlDataTableAdapter adap = new sqlDataTableAdapter(sql,con);
sqlCommandBuilder buider = new sqlCommandBuilder (adap);
adap.FillScheme(dt,SchemeType.Sourced);
adap.Fill(dt);
bool bResult = (adap.Update(dt)) == 1? true:false;
return bResult;
}

private Form_Load ()
{
datagrid1.Datasource = getData(("SELECT DriverID, DriverName, DriverVersion, DriverDLL, DriverEnabled FROM Drivers", connection1);
}

private btnRefresh_Click ( .... )
{
string sql = ("SELECT DriverID, DriverName, DriverVersion, DriverDLL, DriverEnabled FROM Drivers where DriverID = 0");
DataTable dt = (DataTable)datagrid1.Datasource ;
if (saveData(sql,con,dt) == true )
{
MessageBox.Show ("Successful");
}
}

Hope my help !


QuestionGlobal variable in C# Pin
Hamed Musavi7-Apr-07 19:26
Hamed Musavi7-Apr-07 19:26 
AnswerRe: Global variable in C# Pin
Sathesh Sakthivel7-Apr-07 20:44
Sathesh Sakthivel7-Apr-07 20:44 
GeneralRe: Global variable in C# [modified] Pin
Hamed Musavi7-Apr-07 22:09
Hamed Musavi7-Apr-07 22:09 
AnswerRe: Global variable in C# Pin
Muammar©7-Apr-07 21:00
Muammar©7-Apr-07 21:00 
GeneralRe: Global variable in C# Pin
Hamed Musavi7-Apr-07 22:21
Hamed Musavi7-Apr-07 22:21 
GeneralRe: Global variable in C# Pin
Guffa8-Apr-07 7:55
Guffa8-Apr-07 7:55 
AnswerRe: Global variable in C# Pin
Mike_V7-Apr-07 23:00
Mike_V7-Apr-07 23:00 
GeneralRe: Global variable in C# Pin
Hamed Musavi8-Apr-07 5:51
Hamed Musavi8-Apr-07 5:51 
GeneralRe: Global variable in C# Pin
Not Active8-Apr-07 8:49
mentorNot Active8-Apr-07 8:49 
GeneralRe: Global variable in C# Pin
Mike_V8-Apr-07 9:05
Mike_V8-Apr-07 9:05 
AnswerRe: Global variable in C# Pin
Not Active8-Apr-07 8:55
mentorNot Active8-Apr-07 8:55 
QuestionSslStream and X509Chain Pin
atanamir7-Apr-07 14:26
atanamir7-Apr-07 14:26 
Questionvirtual makeover Pin
samreengr87-Apr-07 10:43
samreengr87-Apr-07 10:43 
QuestionNavigation Control Pin
indyfromoz7-Apr-07 10:25
indyfromoz7-Apr-07 10:25 
QuestionAdding controls dynamically Pin
kkadir7-Apr-07 9:49
kkadir7-Apr-07 9:49 
AnswerRe: Adding controls dynamically Pin
J$7-Apr-07 9:56
J$7-Apr-07 9:56 
GeneralRe: Adding controls dynamically Pin
kkadir7-Apr-07 10:05
kkadir7-Apr-07 10:05 

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.