Click here to Skip to main content
15,919,893 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to get the exact year and month Pin
Eliz.k4-Aug-07 5:18
Eliz.k4-Aug-07 5:18 
QuestionHow to select 10-15 records? Pin
FishiFishi1-Aug-07 21:31
FishiFishi1-Aug-07 21:31 
AnswerRe: How to select 10-15 records? Pin
phantanagu1-Aug-07 22:18
phantanagu1-Aug-07 22:18 
AnswerRe: How to select 10-15 records? Pin
Blue_Boy1-Aug-07 22:36
Blue_Boy1-Aug-07 22:36 
AnswerRe: How to select 10-15 records? Pin
kubben2-Aug-07 2:46
kubben2-Aug-07 2:46 
Questionsql sever 2005 supports to generate E-mails ,Do you know to do this ? Pin
prasadbuddhika1-Aug-07 19:02
prasadbuddhika1-Aug-07 19:02 
AnswerRe: sql sever 2005 supports to generate E-mails ,Do you know to do this ? Pin
andyharman1-Aug-07 23:10
professionalandyharman1-Aug-07 23:10 
QuestionMerging data tables together Pin
steve_rm1-Aug-07 15:28
steve_rm1-Aug-07 15:28 
Hello,

VS 2005
I have a datagridview that is bound to a bindingsource.
I am trying to merge this into another data table that has the same schema.

I have filled the dgv with the following code:

The reason i have used a dataview (dv) is so that when the customer selects from the combo box in the dgv, it doesn't automatically filter the rows.
'Fill the pending orders that belong to the order ID<br />
   Private Sub FillPendingOrders()<br />
       Try<br />
                     Me.TA_OrderDetails_dsCodeRed1.Fill(Me.DsAddComponetAndEquipment.OrderDetails)<br />
         <br />
           dv = New DataView(Me.DsAddComponetAndEquipment.OrderDetails)<br />
           dv.RowFilter = String.Format("Status = '{0}' AND OrderID = '{1}'", "Ordered", CInt(Me.cboPendingOrders.SelectedValue))<br />
           Me.dgvPendingOrders.AutoGenerateColumns = False<br />
           Me.bsOrderDetailsPending.DataSource = dv.ToTable()<br />
           Me.dgvPendingOrders.DataSource = Me.bsOrderDetailsPending<br />
       Catch ex As Exception<br />
           MsgBox(ex.Message)<br />
       End Try<br />
   End Sub


However, when i update the datagridview by entering some number into the cells, and click the save button. I have checked the database to see if the value has not been updated, and it hasn't.
This is how i am updating:
             Me.bsOrderDetailsPending.EndEdit()<br />
            Me.DsAddComponetAndEquipment.OrderDetails.Merge(DirectCast(Me.bsOrderDetailsPending.DataSource, DataTable), false)<br />
            'Just to check to see if the value is displayed in the source column. This displayed what I value i put into the source cell ok.<br />
            source = DirectCast(Me.bsOrderDetailsPending.Current, DataRowView)("Source").ToString()<br />
<br />
            Me.TA_OrderDetails_dsCodeRed1.Update(Me.DsAddComponetAndEquipment.OrderDetails)


Many thanks for suggestions,

Steve
QuestionStored Proc StartValue and EndValue [modified] Pin
ASPnoob1-Aug-07 15:08
ASPnoob1-Aug-07 15:08 
AnswerRe: Stored Proc StartValue and EndValue Pin
_Damian S_1-Aug-07 18:14
professional_Damian S_1-Aug-07 18:14 
GeneralRe: Stored Proc StartValue and EndValue Pin
ASPnoob1-Aug-07 19:02
ASPnoob1-Aug-07 19:02 
GeneralRe: Stored Proc StartValue and EndValue Pin
_Damian S_1-Aug-07 19:57
professional_Damian S_1-Aug-07 19:57 
GeneralRe: Stored Proc StartValue and EndValue [modified] Pin
ASPnoob1-Aug-07 20:53
ASPnoob1-Aug-07 20:53 
GeneralRe: Stored Proc StartValue and EndValue Pin
_Damian S_2-Aug-07 1:58
professional_Damian S_2-Aug-07 1:58 
QuestionHelp me Pin
maram20001-Aug-07 13:56
maram20001-Aug-07 13:56 
AnswerRe: Help me Pin
Christian Graus1-Aug-07 14:55
protectorChristian Graus1-Aug-07 14:55 
AnswerRe: Help me Pin
Paul Conrad1-Aug-07 16:36
professionalPaul Conrad1-Aug-07 16:36 
QuestionConvert to Stored Proc [modified] Pin
ASPnoob1-Aug-07 10:44
ASPnoob1-Aug-07 10:44 
AnswerRe: Convert to Stored Proc Pin
Mike Dimmick1-Aug-07 11:42
Mike Dimmick1-Aug-07 11:42 
QuestionHandling null values with SqlDataReader Pin
eggie51-Aug-07 7:24
eggie51-Aug-07 7:24 
AnswerRe: Handling null values with SqlDataReader Pin
Pete O'Hanlon1-Aug-07 9:05
mvePete O'Hanlon1-Aug-07 9:05 
AnswerRe: Handling null values with SqlDataReader Pin
Pete O'Hanlon1-Aug-07 9:31
mvePete O'Hanlon1-Aug-07 9:31 
GeneralRe: Handling null values with SqlDataReader Pin
eggie51-Aug-07 18:46
eggie51-Aug-07 18:46 
AnswerRe: Handling null values with SqlDataReader Pin
Mike Dimmick1-Aug-07 11:48
Mike Dimmick1-Aug-07 11:48 
GeneralRe: Handling null values with SqlDataReader Pin
Pete O'Hanlon2-Aug-07 10:02
mvePete O'Hanlon2-Aug-07 10:02 

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.