Click here to Skip to main content
15,921,959 members
Home / Discussions / Database
   

Database

 
GeneralRecord No. Pin
Tuwing.Sabado9-Jun-04 20:56
Tuwing.Sabado9-Jun-04 20:56 
GeneralRe: Record No. Pin
Hesham Amin9-Jun-04 21:30
Hesham Amin9-Jun-04 21:30 
Generalupdate sql server table with dataset from excel Pin
Anonymous9-Jun-04 4:00
Anonymous9-Jun-04 4:00 
Generaldelete/modify stored procedure Pin
sharonz9-Jun-04 2:44
sharonz9-Jun-04 2:44 
GeneralRe: delete/modify stored procedure Pin
Michael Potter9-Jun-04 6:13
Michael Potter9-Jun-04 6:13 
GeneralRe: delete/modify stored procedure Pin
Edbert P9-Jun-04 20:02
Edbert P9-Jun-04 20:02 
GeneralRe: delete/modify stored procedure Pin
sharonz9-Jun-04 20:22
sharonz9-Jun-04 20:22 
GeneralRe: delete/modify stored procedure Pin
Edbert P9-Jun-04 20:32
Edbert P9-Jun-04 20:32 
GeneralRe: delete/modify stored procedure Pin
sharonz9-Jun-04 20:50
sharonz9-Jun-04 20:50 
GeneralT-SQL for backing up database with current Datetime Pin
Raybot8-Jun-04 23:55
Raybot8-Jun-04 23:55 
GeneralRe: T-SQL for backing up database with current Datetime Pin
RichardGrimmer9-Jun-04 1:30
RichardGrimmer9-Jun-04 1:30 
GeneralRe: T-SQL for backing up database with current Datetime Pin
Michael Potter9-Jun-04 6:17
Michael Potter9-Jun-04 6:17 
GeneralRe: T-SQL for backing up database with current Datetime Pin
Grimolfr9-Jun-04 9:39
Grimolfr9-Jun-04 9:39 
GeneralRe: T-SQL for backing up database with current Datetime Pin
Raybot9-Jun-04 20:58
Raybot9-Jun-04 20:58 
QuestionHow to get list of SQL servers on network ? Pin
vgrigor18-Jun-04 22:55
vgrigor18-Jun-04 22:55 
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 
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 
I updated the parent table for my application before using the PK as FK for the child table, but you might want to try this:
There is a property called DataRow.SetParentRow that sets the parent row for the child table.
I always specify this property before I update the child table, e.g.
<code>parentRow.Key = KeyValue
parentRow.Field1 = Value1
parentRow.Field2 = Value2</code>

//I usually update parent row here before using the value but you might not need to update it before adding the child row.

<code>childRow.Key = parentRow.Key
childRow.Field1 = Value1
childRow.Field2 = Value2
childRow.SetParentRow(parentRow)</code>

//Update child row

This might help you link the two tables along with Key Fields and Foreign Key Fields setting in the dataset.
Remember that you need to update the parent table before the child table for insertion.

I hope it helps.

Edbert P.
Sydney, Australia.

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.