VB.NET TableAdapter not defined - vb.net

I'm sure this must be an easy fix, but I haven't been able to see my error. This code worked previously. I'm currently using VS 2019. I'm receiving an error that my tableadapter is not defined.
Dim mbtAdapter As New DataSet1TableAdapters.amongthehiddenTableAdapter
Dim mbtDataTable As DataSet1.amongthehiddenDataTable = Nothing
mbtDataTable = mbtAdapter.GetDataByQuestion(question)
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'DataSet1TableAdapters.amongthehiddenTableAdapter' is not defined.
Any suggestions greatly appreciated!
dataset1.xsd image
tableadapter image
--- update 7/31/20 ---
Expanded dataset
Dataset properties
Hover - namespace message

Look for the presence of this in your Solution Explorer:
Single click it and check your properties window looks like this:
Double click it and look for something like this:
If you got to here, let me know and I'll suggest some more stuff

Related

Webforms Error shows TWO projects although solution shows ONE project

In a VS-2019 webforms solution I get this error that shows TWO projects although the solution only has ONE project.
Severity: Error
Code Description : BC30456 'prpPageCaption' is not a member of 'MasterPage'.
Project: 7_SessionExpired.aspx, repo_TripManagement
File: C:\Users...\SessionExpired.aspx.vb
Line: 100
Suppression State: Active
It appears that the error shows TWO projects and I did not create a project named 7_SessionExpired.aspx
The vb-page "SessionExpired.aspx and .vb" was copied from a similar project in VS-2017. This is confusing to me and I don't have any way to know what this error is saying.
Here is the LINE=100 from the source VB file:
100| | Master.prpPageCaption = "Session has Expired"
Here is the property in the master-page:
Public Property prpPageCaption() As String
Get
Return Me.lblCaption.Text
End Get
Set(ByVal p_sCaption As String)
Me.lblCaption.Text = p_sCaption
Me.updpanelPageCaption.Update()
End Set
End Property
The vb-page "SessionExpired.aspx and .vb" was copied from a similar project in VS-2017. This is confusing to me and I don't have any way to know what this error is saying. I need your help. Thanks...John
Think the IDE/VS-2019 is confused and I cut ALL of the files for SessionExpired.aspx (.vb) and pasted them in a my-documents-folder.
I then added a webform-page with Master-page (WebForm1.aspx) into the project.
I then added the ASPX objects as UI for the page. I performed a "View Code" option and the / VB-code structure is shown. I only added "Option Explicit ON". Saved both modified files and closed the SOLUTION.
I then re-opened the solution and the code compiled -- even though the full VB-functionality was not coded.
From the 'Solution Explorer' I then renamed the WebForm1.aspx to "SessionExpired" and compiled again -- all ok.
Finally I added the VB-code from the saved-off original SessionExpired.vb code.
All of the errors shown above were cleared and things are working.
IMHO, bringing in an older webform brings with it the old-style of 'designer' and by starting with a VS-2019 webform-page conforms to the VS-2019 designer pattern.
I apologize to those that viewed this question.
Thanks. John.

ssis Package validation error ole db source failed

I am getting the following error when I try and run my package. I am new to ssis. Any suggestions. Tahnks
===================================
Package Validation Error (Package Validation Error)
===================================
Error at Data Flow Task [SSIS.Pipeline]: "OLE DB Source" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
Program Location:
at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
VS_NEEDSNEWMETADATA shows up when the underlying data behind one of the tasks changes. The fastest solution will probably be to just delete and re-create each element which is throwing an error.
How about disabling validation checks?
Like if you right click on source or destination component and select properties then you will have the property named validateExternalMetadata put that as false and try.
This Solution is working for me.
This normally occurs if there has been a change to your schema, not to stress, just double click on your input and output and it should resolve itself
Make sure your connection is valid. If you are using dynamic connections, then try to set the option "delay validation" = true on the package or dataflow.
In my case destination table structure was not matching with matadata in OLEDB component. I added the missing column which i forgot to add and after that it was fixed.
After researching a bit (check to extract your own conclusions: this and this one), I think I've found a nice workaround for when the problem with the metadata comes from a Ole DB object, but only for a very specific case.
The thing is that when you change your columns names / remove columns / add columns, you can't do anything but update the metadata.
However, if you use a SQL query to retrieve the data from the object, in the case that you don't need to update the query itself, you won't need to update the metadata if the query still can ask for what it wants. Basically, if the query is still valid.
I've tried it within my own ETL, and changed an Ole DB object which was reading the data from an Excel file, targeting one sheet and then I had all the columns selected in the tab.
Changing it for an SQL query to retrieve the full sheet like:
SELECT * FROM ['Sheet_Name$']
Solved completely the case for me, even introducing files with different metadata in headers.

Keyword not supported: ´username´

Strange error here, while compiling a report using Stimulsoft I'm getting this error, but it has nothing to do with my connection string which is like this:
Data Source=server\instance;Initial Catalog=mydb;Integrated Security=True
There is no username ever in that connection so I really have no idea why this is happening, any ideas?
Please check your data source used for the report. It might happened that connection string is hard coded somewhere in the code or data source.

workflow task summary throwing error specified cast is not valid using spmetal layer

I have created share point data access layer with spmetal, everything is works fine but when I try to query with task summary list through SPMETAL it throws error I tried several techniques to cast , directly use this Iqueryable list but as I try to access it, "it throws error specified cast is not valid"
Any help or clue why is throwing this error
Its solved by changing the types of event type to string and duration field with double .
that error was produced by SPMETAL wrong mapping while generating the layer form SharePoint.

Getting mapping error. After dragging table with xml fields into dbml file and then compiling

"Error 1 DBML1005: Mapping between DbType 'Xml' and Type 'System.Xml.Linq.XElement' in Column 'XML_LAYOUT' of Type 'QUEST_BLOCK' is not supported."
The above is the error am getting. What am doing is dragging a table with xml fields as columns from server explorer into a dbml file. After that when i compile i am getting the above error. Now after that i changed server datatype to blank. Now the program compiles successfully. But at runtime if i query the table directly using WCF in silverlight the function is showing error. After a debug i found that the select statement on the table is returning the rows in the funtiion, however the error is produced in the reference file in the following function.
Public Function EndGetQuestionListRecord1(ByVal result As System.IAsyncResult) As ServiceReference1.QUEST_BLOCK Implements ServiceReference1.Medex.EndGetQuestionListRecord1
Dim _args((0) - 1) As Object
Dim _result As ServiceReference1.QUEST_BLOCK = CType(MyBase.EndInvoke("GetQuestionListRecord1", _args, result),ServiceReference1.QUEST_BLOCK)
Return _result
End Function
Hope someone around here could resolve this error...
rideonscreen, recently I started getting the same type of error. In my case I get it dragging a stored procedure with a XML input parameter.
I wonder whether you managed to resolve the issue and how.
I googled and found some articles:
http://dev.techmachi.com/?p=319
http://www.west-wind.com/Weblog/posts/505990.aspx
http://www.jonathanjungman.com/blog/post/Visual-Studio-Build-failed-due-to-validation-errors-in-dbml-file.aspx
"devenv /resetskippkgs" helps, but next day the issue appears again.
What is also interesting that I do not touch the LINQ2SQL model (dbml file) at all. The code there is the same for a long time. The issues is definitely exclusively related to Visual Studio.
P.S. I am thinking to migrate to EF.