Click here to Skip to main content
15,913,722 members
Home / Discussions / Database
   

Database

 
AnswerRe: Problem using EntLib DAAB for .NET 2.0 Pin
Colin Angus Mackay20-Jun-06 10:48
Colin Angus Mackay20-Jun-06 10:48 
AnswerRe: Problem using EntLib DAAB for .NET 2.0 Pin
Not Active21-Jun-06 9:34
mentorNot Active21-Jun-06 9:34 
QuestionHow do I reattach a database file that was not detached? Pin
Jesse Evans20-Jun-06 8:55
Jesse Evans20-Jun-06 8:55 
AnswerRe: How do I reattach a database file that was not detached? Pin
Eric Dahlvang20-Jun-06 12:14
Eric Dahlvang20-Jun-06 12:14 
GeneralRe: How do I reattach a database file that was not detached? Pin
Jesse Evans20-Jun-06 12:26
Jesse Evans20-Jun-06 12:26 
QuestionDatagrid showing bogus data [modified] Pin
leckey20-Jun-06 7:41
leckey20-Jun-06 7:41 
AnswerRe: Datagrid showing bogus data Pin
Edbert P20-Jun-06 19:22
Edbert P20-Jun-06 19:22 
GeneralRe: Datagrid showing bogus data Pin
leckey21-Jun-06 3:12
leckey21-Jun-06 3:12 
Okay, I think I know what you mean. Here is what I have now:
private void BindData()<br />
		{<br />
			strPartNumberInputReference = txtPartNumberInput.Text;<br />
			<br />
<br />
			string SQLString = "SELECT p.PartNumber, pt.description, dd.DrawingNumber, dd.DrawingRevision, dd.DwgPath FROM parts p INNER JOIN PartTypes pt on pt.ID =p.PartTypeID LEFT JOIN DraftingData dd on dd.PartID = p.ID WHERE p.PartNumber = @PartID;SELECT w.weight, wt.Description AS wtDescription, p.PartNumber from weights w INNER JOIN weighttypes wt on wt.ID = w.weighttypeid INNER JOIN Parts p on w.PartID = p.ID WHERE p.PartNumber = @PartID;SELECT c.cost, p.PartNumber, ct.Description AS ctDescription from Costs c INNER JOIN Parts p ON c.PartID = p.Id INNER JOIN CostTypes ct on ct.Id = c.CostTypeID WHERE p.PartNumber = @PartID; SELECT s.SubPartID, s.Quantity, s.Sequence, p.PartNumber FROM SubParts s INNER JOIN Parts p ON s.PartID = p.Id "; <br />
			<br />
			<br />
			SqlCommand cmd = new SqlCommand();<br />
			cmd.Connection = new SqlConnection(strConnectSQL);<br />
			cmd.CommandText = SQLString;<br />
			cmd.Parameters.Add ("@PartID", strPartNumberInputReference);<br />
			SqlDataAdapter adapter = new SqlDataAdapter(cmd);<br />
			adapter.Fill(ds);<br />
<br />
		<br />
			ds.Tables[1].TableName = "Weights";<br />
			ds.Tables[2].TableName = "Costs";<br />
			ds.Tables[3].TableName = "Subparts";<br />
		<br />
			dgParts.DataSource = ds;<br />
			dgParts.DataBind();<br />
			txtPartNumberInput.Text = "";<br />
		}


So when the user enters the data the grid comes back perfect. Just how I want it. BUT when I hit the Edit button, I get back to the problem of bogus data.
public void dgParts_edit (object sender, DataGridCommandEventArgs e)<br />
		{<br />
			dgParts.EditItemIndex = e.Item.ItemIndex;<br />
			BindData();<br />
		}


So I'm still not sure what I am doing wrong.
GeneralRe: Datagrid showing bogus data Pin
Edbert P21-Jun-06 14:01
Edbert P21-Jun-06 14:01 
QuestionLooking for Book Recommendation ... Pin
David Patrick20-Jun-06 6:54
David Patrick20-Jun-06 6:54 
AnswerRe: Looking for Book Recommendation ... Pin
Eric Dahlvang22-Jun-06 9:19
Eric Dahlvang22-Jun-06 9:19 
QuestionExtract column name of a table Pin
bony_baba20-Jun-06 1:55
bony_baba20-Jun-06 1:55 
AnswerRe: Extract column name of a table Pin
Colin Angus Mackay20-Jun-06 2:10
Colin Angus Mackay20-Jun-06 2:10 
GeneralRe: Extract column name of a table Pin
bony_baba20-Jun-06 2:55
bony_baba20-Jun-06 2:55 
GeneralRe: Extract column name of a table Pin
vivek-g20-Jun-06 23:16
vivek-g20-Jun-06 23:16 
GeneralRe: Extract column name of a table Pin
Colin Angus Mackay21-Jun-06 8:35
Colin Angus Mackay21-Jun-06 8:35 
QuestionConnecting to Oracle DB through webservice Pin
mew_lobo20-Jun-06 0:53
mew_lobo20-Jun-06 0:53 
AnswerRe: Connecting to Oracle DB through webservice Pin
Frank Kerrigan20-Jun-06 4:48
Frank Kerrigan20-Jun-06 4:48 
GeneralRe: Connecting to Oracle DB through webservice Pin
mew_lobo20-Jun-06 21:33
mew_lobo20-Jun-06 21:33 
AnswerRe: Connecting to Oracle DB through webservice Pin
Chris Meech20-Jun-06 6:19
Chris Meech20-Jun-06 6:19 
GeneralRe: Connecting to Oracle DB through webservice Pin
mew_lobo21-Jun-06 0:43
mew_lobo21-Jun-06 0:43 
GeneralRe: Connecting to Oracle DB through webservice Pin
Chris Meech21-Jun-06 3:20
Chris Meech21-Jun-06 3:20 
Questionspeed up select statement Pin
Support12319-Jun-06 23:41
Support12319-Jun-06 23:41 
AnswerRe: speed up select statement Pin
Colin Angus Mackay20-Jun-06 2:17
Colin Angus Mackay20-Jun-06 2:17 
GeneralRe: speed up select statement Pin
Support12320-Jun-06 2:27
Support12320-Jun-06 2:27 

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.