Advertisement

12.27.2007 at 10:06AM PST, ID: 23045243
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

3.6

SQL Server error 8178 when updating the backend database from VS2005 Windows application using datasets and data adapters

Asked by VBProEd in .Net Editors & IDEs, SQL Server 2005, Visual Studio

Tags: , , , ,

This message has me very confused since I cannot seem to trace where it's a problem.  I am using VS 2005/VB.NET with typed datasets and use the auto-generated dataadapters for the datasets.  I am attempting to create a new row on my SQL Server table and I get the following error after executing MyDataAdapter.Update(MyDataSet):

8178  The parameterized query (@Description varchar(50), @Doc_URL varchar(120), @Orig_ID int, @Or expects the parameter @IsNull_Doc_URL, which was not supplied.

I have created 20 tables, datasets and data adapters for this project and this is the first time I have had a problem adding a row to any backend data table.  It's also not clear to me if MyDataAdapter.Update method is using the Insert SQL or the Update SQL.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
SQL Server Table Update code:
    Public Function UpdateSQlDB(ByVal MyDataSet As Object, ByVal MyDataAdapter As Object, ByVal MySQLTable As String) As Boolean
        'This sub updates the SQl database.
        'MyDataSet - name of the dataset that contains the datatable from which the SQL updates will be made
        'MyDataAdapter - name of the data adapter to use for the update
        'MySQLTable - name of the SQL Table dataset to end edits
        Try
            Me.BindingContext(MyDataSet, MySQLTable).EndCurrentEdit()  'Stop any current edits
            MyDataAdapter.Update(MyDataSet)                            'Update SQL Server database
 
        Catch eConcurrency As DBConcurrencyException
            MessageBox.Show("This record has been updated by another user. " & ControlChars.CrLf _
            & "Exit the form, reselect the record, and redo your updates.", "DB Concurrency Error")
 
            'The update failed
            Return False
 
        Catch eData As DataException
            MessageBox.Show(eData.Message, "ADO.Net Error")
 
            'The update failed
            Return False
 
        Catch eSQL As SqlException
            Dim iError As Integer
            Dim SQLErrors As SqlErrorCollection = eSQL.Errors
            Dim sErrorSummary As String = String.Empty
 
            For iError = 0 To SQLErrors.Count - 1
                'Display a custom error msg for certain SQL errors otherwise display standard SQl error msg
                Dim SQlErrorMsg
                'If SQLErrors(iError).Number = 547 Then
                'SQlErrorMsg = "Delete cancelled. History records must be deleted first."
                'Else
                SQlErrorMsg = SQLErrors(iError).Message
                'End If
 
                sErrorSummary = sErrorSummary & SQLErrors(iError).Number & " - " _
                & SQlErrorMsg _
                & ControlChars.CrLf
            Next iError
 
            MessageBox.Show(sErrorSummary, "SQL Server Error")
 
            'The update failed
            Return False
 
        Catch eSystem As Exception
            MessageBox.Show(eSystem.Message, "System Error")
 
            'The update failed
            Return False
        End Try
 
        'The update succeeded
        Return True
    End Function
 
SQL INSERT statement:
INSERT INTO Issue
                         (Description, Doc_URL, Orig_ID, Orig_Source_ID, Orig_Point_ID, Orig_Case_No, Response_To_ID, Response_Due_Date, Open_Date, Create_Date, 
                         Last_Update_Date, Status_Activity_ID, Status_Activity_Date, Status, Status_Date)
VALUES        (@Description,@Doc_URL,@Orig_ID,@Orig_Source_ID,@Orig_Point_ID,@Orig_Case_No,@Response_To_ID,@Response_Due_Date,@Open_Date,@Create_Date,@Last_Update_Date,@Status_Activity_ID,@Status_Activity_Date,@Status,@Status_Date)
 
SQL UPDATE statement (auto-generated from VS2005 for dataadapter):
UPDATE       Issue
SET                Description = @Description, Doc_URL = @Doc_URL, Orig_ID = @Orig_ID, Orig_Source_ID = @Orig_Source_ID, Orig_Point_ID = @Orig_Point_ID, 
                         Orig_Case_No = @Orig_Case_No, Response_To_ID = @Response_To_ID, Response_Due_Date = @Response_Due_Date, Open_Date = @Open_Date, 
                         Create_Date = @Create_Date, Last_Update_Date = @Last_Update_Date, Status_Activity_ID = @Status_Activity_ID, 
                         Status_Activity_Date = @Status_Activity_Date, Status = @Status, Status_Date = @Status_Date
WHERE        (ID = @Original_ID) AND (Description = @Original_Description) AND (@IsNull_Doc_URL = 1 AND Doc_URL IS NULL OR
                         Doc_URL = @Original_Doc_URL) AND (@IsNull_Orig_ID = 1 AND Orig_ID IS NULL OR
                         Orig_ID = @Original_Orig_ID) AND (@IsNull_Orig_Source_ID = 1 AND Orig_Source_ID IS NULL OR
                         Orig_Source_ID = @Original_Orig_Source_ID) AND (@IsNull_Orig_Point_ID = 1 AND Orig_Point_ID IS NULL OR
                         Orig_Point_ID = @Original_Orig_Point_ID) AND (@IsNull_Orig_Case_No = 1 AND Orig_Case_No IS NULL OR
                         Orig_Case_No = @Original_Orig_Case_No) AND (@IsNull_Response_To_ID = 1 AND Response_To_ID IS NULL OR
                         Response_To_ID = @Original_Response_To_ID) AND (@IsNull_Response_Due_Date = 1 AND Response_Due_Date IS NULL OR
                         Response_Due_Date = @Original_Response_Due_Date) AND (@IsNull_Open_Date = 1 AND Open_Date IS NULL OR
                         Open_Date = @Original_Open_Date) AND (@IsNull_Create_Date = 1 AND Create_Date IS NULL OR
                         Create_Date = @Original_Create_Date) AND (@IsNull_Last_Update_Date = 1 AND Last_Update_Date IS NULL OR
                         Last_Update_Date = @Original_Last_Update_Date) AND (@IsNull_Status_Activity_ID = 1 AND Status_Activity_ID IS NULL OR
                         Status_Activity_ID = @Original_Status_Activity_ID) AND (@IsNull_Status_Activity_Date = 1 AND Status_Activity_Date IS NULL OR
                         Status_Activity_Date = @Original_Status_Activity_Date) AND (@IsNull_Status = 1 AND Status IS NULL OR
                         Status = @Original_Status) AND (@IsNull_Status_Date = 1 AND Status_Date IS NULL OR
                         Status_Date = @Original_Status_Date)
[+][-]12.27.2007 at 10:49AM PST, ID: 20536066

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 11:07AM PST, ID: 20536182

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 11:37AM PST, ID: 20536426

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 12:09PM PST, ID: 20536751

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 01:04PM PST, ID: 20537164

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 01:08PM PST, ID: 20537196

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 03:29PM PST, ID: 20538253

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 03:35PM PST, ID: 20538292

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 03:57PM PST, ID: 20538437

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.27.2007 at 04:06PM PST, ID: 20538494

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.28.2007 at 01:28AM PST, ID: 20540590

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.28.2007 at 11:15AM PST, ID: 20544227

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.30.2007 at 06:42AM PST, ID: 20550905

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.30.2007 at 03:27PM PST, ID: 20552481

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.30.2007 at 03:29PM PST, ID: 20552490

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.03.2008 at 01:52PM PST, ID: 20577348

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 11:39AM PST, ID: 20585439

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 01:09PM PST, ID: 20586142

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 02:06PM PST, ID: 20586500

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 02:42PM PST, ID: 20586694

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 03:10PM PST, ID: 20586871

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 03:30PM PST, ID: 20586976

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.04.2008 at 03:57PM PST, ID: 20587100

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 01:10AM PST, ID: 20588484

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 01:41PM PST, ID: 20590855

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, SQL Server 2005, Visual Studio
Tags: Microsoft, Visual Studio, 2005, .NET Framework 2.0, SQL Server 8178 - The parameterized query (@Description varchar(50), @Doc_URL varchar(120), @Orig_ID int, @Or expects the parameter @IsNull_Doc_URL, which was not supplied.
Sign Up Now!
Solution Provided By: VBProEd
Participating Experts: 2
Solution Grade: B
 
 
[+][-]01.05.2008 at 01:59PM PST, ID: 20590906

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 02:31PM PST, ID: 20591044

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 02:31PM PST, ID: 20591047

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 03:00PM PST, ID: 20591243

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 03:11PM PST, ID: 20591353

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.09.2008 at 09:35AM PST, ID: 20620234

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628