Click here to Skip to main content
15,897,181 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to get list of SQL servers on network ? Pin
Hesham Amin9-Jun-04 0:21
Hesham Amin9-Jun-04 0:21 
QuestionHow i Can format Date in Sql Server 7.0 Pin
syed saba8-Jun-04 21:47
syed saba8-Jun-04 21:47 
AnswerRe: How i Can format Date in Sql Server 7.0 Pin
Hesham Amin9-Jun-04 6:50
Hesham Amin9-Jun-04 6:50 
GeneralRe: How i Can format Date in Sql Server 7.0 Pin
-Dr_X-9-Jun-04 15:30
-Dr_X-9-Jun-04 15:30 
Generalgetting value from newly inserted row Pin
sharonz8-Jun-04 20:54
sharonz8-Jun-04 20:54 
GeneralRe: getting value from newly inserted row Pin
Edbert P9-Jun-04 20:34
Edbert P9-Jun-04 20:34 
GeneralRe: getting value from newly inserted row Pin
sharonz9-Jun-04 20:50
sharonz9-Jun-04 20:50 
GeneralProbelm in Displaying records in 2 data grids Pin
orpus8-Jun-04 20:27
orpus8-Jun-04 20:27 
Hi ..
please see the code below..
I have two tables Centrals and Devices both having Central_Id as a common field..I am able to display the Centals table value in the first datagrid (dataGirdCentral).However on click of each cell on the central_id i want the corresponding entries of Devices table to be shown in the 2nd datagrid dataGridDevices..how do i do that...

private void loadCentralDevices()
{
ds = new DataSet();
//Getting schema of Centrals table
DataTable centralDt = new DataTable("Centrals");
String query = "Select * from Centrals";
OleDbDataAdapter da = new OleDbDataAdapter(query,ConfigurationSettings.AppSettings["MsAccess_ConnectString"]);
da.FillSchema(centralDt, SchemaType.Source);
ds.Tables.Add(centralDt);


//Getting schema of Devices table
DataTable deviceDt = new DataTable("Devices");
String query1 = "Select * from Devices";
da = new OleDbDataAdapter(query1,ConfigurationSettings.AppSettings["MsAccess_ConnectString"]);
da.FillSchema(deviceDt,SchemaType.Source);
ds.Tables.Add(deviceDt);

DataRelation dr = new DataRelation("Central_Devices_Relation",
centralDt.Columns["Central_ID"], deviceDt.Columns["Central_Id"]);
ds.Relations.Add(dr);

//create a dataview of the data
DataView centralVw = new DataView(ds.Tables["centralDt"]);
//giving access to Centrals table
centralVw.AllowDelete=true;
centralVw.AllowEdit = true;
centralVw.AllowNew = true;
//set the grid source to the author view
dataGridCentral.DataSource = centralVw;
//hook up the event handler
dataGridCentral.CurrentCellChanged+= new EventHandler(this.dataGridCentral_CellChanging);

}


private void dataGridCentral_CellChanging(object sender, EventArgs eArgs)
{
????? what do i write here to get the corresponding values?
}

Breath dot net
GeneralInserting Rows into Typed DataSets Pin
Member 11376038-Jun-04 17:43
Member 11376038-Jun-04 17:43 
GeneralRe: Inserting Rows into Typed DataSets Pin
Edbert P9-Jun-04 20:16
Edbert P9-Jun-04 20:16 
GeneralVC++ ADO Recordset Close Vs NULL Pin
Nemikesoria8-Jun-04 4:47
Nemikesoria8-Jun-04 4:47 
Generalsql reporting services Pin
robmays8-Jun-04 4:03
robmays8-Jun-04 4:03 
GeneralADO & GUID & C++ Pin
Mobileware8-Jun-04 0:46
Mobileware8-Jun-04 0:46 
QuestionI want to do a ETL tool. ADO is feasible? Pin
utiao7-Jun-04 21:27
utiao7-Jun-04 21:27 
AnswerRe: I want to do a ETL tool. ADO is feasible? Pin
Anonymous11-Jun-04 9:47
Anonymous11-Jun-04 9:47 
GeneralOracle REF Cursor and Generic DAL Pin
Vasudevan Deepak Kumar7-Jun-04 17:55
Vasudevan Deepak Kumar7-Jun-04 17:55 
GeneralProblem using table aliases in ADO.net dataset Pin
frank217-Jun-04 11:06
frank217-Jun-04 11:06 
GeneralReturn ID from Insert Query Pin
RDoes7-Jun-04 3:56
RDoes7-Jun-04 3:56 
GeneralRe: Return ID from Insert Query Pin
GISnet7-Jun-04 5:43
GISnet7-Jun-04 5:43 
Generalcode for db access in C# Pin
Md Saleem Navalur7-Jun-04 2:32
Md Saleem Navalur7-Jun-04 2:32 
GeneralRe: code for db access in C# Pin
GISnet7-Jun-04 5:48
GISnet7-Jun-04 5:48 
Generalexport to access Pin
suzyb7-Jun-04 1:52
suzyb7-Jun-04 1:52 
GeneralRe: export to access Pin
GISnet7-Jun-04 5:54
GISnet7-Jun-04 5:54 
GeneralRe: export to access Pin
Mike Ellison7-Jun-04 9:59
Mike Ellison7-Jun-04 9:59 
Generaldb @ pocket pc Pin
ting6687-Jun-04 0:23
ting6687-Jun-04 0:23 

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.