Click here to Skip to main content
15,885,278 members
Home / Discussions / Database
   

Database

 
AnswerRe: datetime problem Pin
Pratik Vasant Shah28-Jun-07 20:19
Pratik Vasant Shah28-Jun-07 20:19 
Questionhow to pass null values to a query in the design time Pin
pashitech28-Jun-07 0:12
pashitech28-Jun-07 0:12 
AnswerRe: how to pass null values to a query in the design time Pin
Xandip28-Jun-07 20:13
Xandip28-Jun-07 20:13 
QuestionDate Time String Transformation sample mssql Pin
cutequencher27-Jun-07 23:18
cutequencher27-Jun-07 23:18 
AnswerRe: Date Time String Transformation sample mssql Pin
andyharman28-Jun-07 0:18
professionalandyharman28-Jun-07 0:18 
GeneralRe: Date Time String Transformation sample mssql Pin
cutequencher28-Jun-07 0:39
cutequencher28-Jun-07 0:39 
Questionsql data adapter.update Pin
Sebastian T Xavier27-Jun-07 22:42
Sebastian T Xavier27-Jun-07 22:42 
AnswerRe: sql data adapter.update Pin
Vimalsoft(Pty) Ltd28-Jun-07 22:35
professionalVimalsoft(Pty) Ltd28-Jun-07 22:35 
See this , i did this in vb.net


'save the datasource Changes
If mblnIsDirty Then
If MessageBox.Show("Do you want to Save the Changes?", "Property", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
' Checking for Error in the dataset
Try
SqlDataAdapter1.Update(DataSet11, "Property")
Catch
MessageBox.Show("Error saving Data in the DataBase", "Property")
checkerrors()
End Try
End If
End If
<br />
<br />
The Check Errors will tell you where did you go wrong<br />
here is code for checkErrors<br />
<code><br />
    Private Sub checkerrors()<br />
<br />
        Dim table As Data.DataTable<br />
        Dim row As Data.DataRow<br />
        SqlDataAdapter1.Update(DataSet11, "Property")<br />
        If DataSet11.HasErrors Then<br />
<br />
            For Each table In DataSet11.Tables<br />
                If table.HasErrors Then<br />
<br />
                    For Each row In table.Rows<br />
                        If row.HasErrors Then<br />
                            MessageBox.Show("Dataset has Errors")<br />
                            ' Process error here.<br />
<br />
                        End If<br />
                    Next<br />
                ElseIf table.HasErrors = False Then<br />
                    MessageBox.Show("Dataset has no Errors")<br />
                End If<br />
            Next<br />
        End If<br />
    End Sub<br />
<br />


And this is the insert
<br />
 'save the New Record for an Add or Edit<br />
        If mblnAdding Then<br />
            Try<br />
                Dim newRow As DataRow = DataSet11._PROPERTY.NewRow<br />
                newRow("Num_key") = CStr(txtnumkey.Text)<br />
                newRow("Extension") = CInt(txtextension.Text)<br />
                newRow("Cell_ID") = CInt(txtcellid.Text)<br />
                newRow("ACTUAL_EXTENT") = CInt(txtactualextent1.Text)<br />
                newRow("Lis_key") = CStr(txtliskey.Text)<br />
                newRow("Func_key") = CStr(txtfunckey.Text)<br />
                newRow("PROP_CATEGORY_ID") = CInt(Prop_Category_ID)<br />
                newRow("Geocode") = CStr(txtgeocode.Text)<br />
                newRow("Rateable") = Rateable<br />
                newRow("Non_Discreet_Valid") = Non_Discreet_Valid<br />
                DataSet11._PROPERTY.Rows.Add(newRow)<br />
                Catch exc As Exception<br />
                MessageBox.Show("Unable to add the Record." & _<br />
                ControlChars.NewLine & exc.Message, "Property")<br />
<br />
            End Try<br />
            mblnAdding = False<br />
            lblRecordNumber.Text = "Record Added at the end of the Table"<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />

Hope this Helps

Vuyiswa

QuestionMySQL - C# - problem with charset encoding Pin
yarns27-Jun-07 22:26
yarns27-Jun-07 22:26 
AnswerRe: MySQL - C# - problem with charset encoding Pin
Giorgi Dalakishvili27-Jun-07 22:45
mentorGiorgi Dalakishvili27-Jun-07 22:45 
GeneralRe: MySQL - C# - problem with charset encoding Pin
yarns27-Jun-07 22:51
yarns27-Jun-07 22:51 
GeneralRe: MySQL - C# - problem with charset encoding Pin
Giorgi Dalakishvili27-Jun-07 22:53
mentorGiorgi Dalakishvili27-Jun-07 22:53 
GeneralRe: MySQL - C# - problem with charset encoding Pin
yarns27-Jun-07 23:19
yarns27-Jun-07 23:19 
GeneralRe: MySQL - C# - problem with charset encoding Pin
Giorgi Dalakishvili27-Jun-07 23:24
mentorGiorgi Dalakishvili27-Jun-07 23:24 
QuestionSaving Sybase Data to Excel Pin
meeram39527-Jun-07 20:26
meeram39527-Jun-07 20:26 
QuestionSQL Server 2005 Reporting Services Pin
Pratik Vasant Shah27-Jun-07 19:38
Pratik Vasant Shah27-Jun-07 19:38 
AnswerRe: SQL Server 2005 Reporting Services Pin
martin_hughes28-Jun-07 8:20
martin_hughes28-Jun-07 8:20 
QuestionRe: SQL Server 2005 Reporting Services Pin
Pratik Vasant Shah28-Jun-07 20:21
Pratik Vasant Shah28-Jun-07 20:21 
AnswerRe: SQL Server 2005 Reporting Services Pin
martin_hughes29-Jun-07 1:35
martin_hughes29-Jun-07 1:35 
QuestionSQL Inner Join? Pin
Expert Coming27-Jun-07 14:56
Expert Coming27-Jun-07 14:56 
AnswerRe: SQL Inner Join? Pin
Chinnakasu27-Jun-07 16:31
Chinnakasu27-Jun-07 16:31 
AnswerRe: SQL Inner Join? Pin
Guffa27-Jun-07 20:51
Guffa27-Jun-07 20:51 
QuestionVB.Net 64 bit long to SQL [modified] Pin
Polymorpher27-Jun-07 12:18
Polymorpher27-Jun-07 12:18 
AnswerRe: VB.Net 64 bit long to SQL Pin
Mike Dimmick27-Jun-07 23:13
Mike Dimmick27-Jun-07 23:13 
GeneralRe: VB.Net 64 bit long to SQL Pin
Polymorpher28-Jun-07 9:44
Polymorpher28-Jun-07 9:44 

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.