Data Source generation problem RRS feed

  • Question

  • If this is mispost, I apologize- having a hard time finding a place to ask this question.

    I'm supporting an older app in VS2005.  The app uses a datasource (xsd) generated by VS to do stored procedure calls.  My business layer creates lots of instances of datatables and tableadapters in the namespace of the generated datasource.  This looks like this:

    Dim dt as new MyData.DB.spGetStatusDataTable
    Dim adapter as new MyData.DB.DBTableAdapters.spGetStatusTableAdapter

    where DB is the name of my datasource

    I changed a stored procedure and needed to regenerate the source, so using a little-remembered routine, I deleted the old DB.xsd (and the designer.vb and .xsc and .xss files) and went to Data->Add New Data Source.  I selected a database, selected all of the stored procedures, and then generated the source.

    And now there are no datatables or table adapters.  I had thought such things were automatically created when one generated the datasource (and that's what I remember happening before) but now, not so much.  Am I missing some setting? I realize datatables can be generated going through the designer, but there are quite a few stored procedure and doing this for each stored procedure would be quite an endeavor.

    All help is appreciated.

    Wednesday, February 13, 2008 3:31 PM

All replies


    I've run into this problem myself.


    I would have to say that this is an issue in VB that has caused me a lot of trouble... Meaning that simply changing or editting even one stored procedure can often times influence an entire datasource (.xds).


    At any rate, let me ask you, what kind of stored procedure did you change?

    Wednesday, February 13, 2008 3:39 PM
  • Just an update stored procedure, something I've done many times.  When regenerated, though- all my datatable and tableadapter objects just vanished.  Nothing will compile now (except the data layer, of course- it's fat and happy and useless).

    Wednesday, February 13, 2008 3:46 PM

    Do you have the code for your update?


    And also, are you saying your Datatable and Data Adpater are still present in your (.XDS) Data Designer, but without any any Data Table Objects or Table Adapter Stored Procedures?? 


    Check out this link too, it may answer our question...


    Wednesday, February 13, 2008 6:10 PM
  • No, I'm saying the datatables and tableadapters are no longer present in the datasource.  They existed before but now they don't.  My business layer is choking because the references to all of my data layer's tableadapters are pointing to nonexistent objects.  I don't think the stored procedure is the issue, it's the regeneration of the data source that's screwing things up.

    Wednesday, February 13, 2008 8:44 PM