none
DataSet GenerateDBDirectMethods Error RRS feed

  • Question

  • I have created a VB.Net (VS2015) application that connects to Sql Server 2008 R2. I have added a simple Select statement to my Dataset.  This select statement selects from two tables.  I am trying to create a Delete, Insert and Update Statement to JUST ONE of these tables.  When i go to change the value of the "GenerateDBDirectMethods" From a value of FALSE to the value of TRUE, I am getting an error message of "The type of the database object does not allow to set GenerateDBDirect to true"  am i missing something.  HOW can i update, delete or insert into this ONE table?

    SELECT        AttendanceInfractions.EnterpriseID, AttendanceInfractions.OccuranceDate, AttendanceInfractions.Comments, AttendanceInfractions.Discipline, 
                             AttendanceInfractions.DateTimeLogged, AttendanceInfractions.UpdateBy, AttendanceInfractions.FacilityOccurred, AttendanceInfractions.ComputerID, 
                             AttendanceInfractions.AttendRecordNum, AttendanceInfractions.UsePoints, AttendanceInfractions.FreeDays, AttendanceInfractions.AttendCode, 
                             AttendanceCodes.AttendanceCodeDesc, AttendanceCodes.MaintPointValue AS PointValue, AttendanceCodes.UseForAttend_Leave
    FROM            AttendanceInfractions INNER JOIN
                             AttendanceCodes ON AttendanceInfractions.AttendCode = AttendanceCodes.AttendCode
    WHERE        (AttendanceInfractions.EnterpriseID = @EnterpriseID)


    Paul

    Monday, April 24, 2017 4:36 PM

Answers

  • Hi Paul,

    The forums have had major problems the last few days. Most posts, including this one, did not show in any view of threads. We have just seen this question.

    This forum is for questions and discussions about the Visual Studio IDE, as your issue is more related to the ado.net dataset. I will move this question to that forum for better support.

    Thanks for your understanding and cooperation.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Paul 2 U Thursday, April 27, 2017 12:16 PM
    Thursday, April 27, 2017 3:15 AM
  • Hi Paul 2 U,

    Please set the GenerateDbDirectMethods to false in TableAdapter and only use the InsertCommand, UpdateCommand, and DeleteCommand and check if it works.

    Best regards,

    Cole Wu


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    • Marked as answer by Paul 2 U Friday, April 28, 2017 8:38 PM
    Friday, April 28, 2017 5:24 AM
    Moderator

All replies

  • Hi Paul,

    The forums have had major problems the last few days. Most posts, including this one, did not show in any view of threads. We have just seen this question.

    This forum is for questions and discussions about the Visual Studio IDE, as your issue is more related to the ado.net dataset. I will move this question to that forum for better support.

    Thanks for your understanding and cooperation.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Paul 2 U Thursday, April 27, 2017 12:16 PM
    Thursday, April 27, 2017 3:15 AM
  • Hi Paul 2 U,

    Please set the GenerateDbDirectMethods to false in TableAdapter and only use the InsertCommand, UpdateCommand, and DeleteCommand and check if it works.

    Best regards,

    Cole Wu


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    • Marked as answer by Paul 2 U Friday, April 28, 2017 8:38 PM
    Friday, April 28, 2017 5:24 AM
    Moderator