I want to read data from SQL server database in Win10 UWP. So I'm trying to run this sample codes from https://code.msdn.microsoft.com/windowsapps/How-to-access-data-from-935e360c
in Visual Studio to read data from SQL server to UWP. I don't know why I keep getting this error:
Error
I already read this and even tried the answers given :
Type universe cannot resolve assembly: System.Configuration AND Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll
Related
In Visual Studio (2019) I've made an assembly that is using Microsoft.SqlServer.Types, and I compiled it without error messages.
Now I try to import this assembly into my SQL Server (2019) database with T-SQL, but this message appears:
Msg 10300, Level 16, State 2, Line 1 Assembly "MyAssembly" references assembly 'microsoft.sqlserver.types, version=15.100.0.0,
culture=neutral, publickeytoken=89845dcd8080cc91.', which is not
present in the current database. SQL Server attempted to locate and
automatically load the referenced assembly from the same location
where referring assembly came from, but that operation has failed
(reason: another assembly with same SQL name is already present in the
current database). Please load the referenced assembly into the
current database and retry your request.
In SSMS (18.5.1) I see that the microsoft.sqlserver.types that SQL Server is using has a different version: 15.0.0.0.
If I try to remove this from SQL Server before importing the 15.100.0.0 version I get a message saying that deleting is not possible because it is a system assembly.
What is the best I can do now? I am brand new to this stuff.
I have a simple MVC app I'm working on. I'm trying to connect to a MSSQL server using Entity Data Model (code first from database). After successfully adding the data using the Entity Data Model Wizard, the code below throws the error "The provider did not return a ProviderManifestToken string". The inner exception is "Unable to connect to any of the specified MySql Hosts. The thing I can't figure out though, is I'm not using MySql anywhere in the project. Searching in the project explorer for "MySql" turns up nothing. Doing a Ctrl+F and searching for MySql also returns nothing found. My web.config only has the one connection string in it for the MSSQL server connection. What can I do to figure out why my project is trying to connect to this unknown MySQL server?
My code:
string something = kyg.Products.FirstOrDefault(m => m.ItemNo == "128676").ShortDescription.ToString();
I don't have an issue with the MSSQL server - I have many apps that are running successfully on the same connection. I just can't find this unknown reference to a MySql server. Any Ideas on where to look/what to try?
Edit
I felt it is worth mentioning that I inherited this project, and can't confirm what development was done on it prior to me taking it over. Also, I was looking through the files, and did find MySql.Data.dll, MySql.Data.Entity.EF6.dll, and MySql.Web.dll. I moved these files out of the bin folder, and now receive a different error -
File Not Found - Could not load file or assembly MySql.Data.Entity.EF6.dll - so something is trying to reference that dll, I just can't figure out what or where it is coming from.
Thanks in advance,
Currently we moved our Web Applications to a new server so now we have a Database and Web + App Server. Before moving everything was working fine.
But now as we have installed SQL Server on the DB Server we are getting errors related to:
Microsoft.SqlServer DLL files.
So basically the code runs a script on the DB server to create a New Database.
First I was getting the Error, related to: Microsoft.SqlServer.ConnectionInfo.dll
So I installed, the nuget Package: Shared Management Objects
Which seemed to have fix the Problem.
BUT now I am getting an error related to Microsoft.SqlServer.BatchParser
I followed the links online and they suggest to install:
Shared Management Objects from here; https://www.microsoft.com/en-pk/download/confirmation.aspx?id=29065
Note; we are using SQL server 2012 standard.
So I installed Shared Management Objects and also restarted the server, but I am still getting the same error.
Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
If I navigate to: C:\Windows\assembly I can see that Microsoft.SqlServer.BatchParser:
The Exception occurs on this line of code:
server.ConnectionContext.ExecuteNonQuery(script);
I've been searching for a solution to my doubt but couldn't find anything more relevant than an installation issue, which isn't a problem in my case.
I am trying to execute a C# project (similar to this) that creates a local cube (.cub) file and processes data taken from an existing processed cube on Analysis Services 2012.
The project runs correctly when I use a connection string for output cube that points (and hence writes) to another database on Analysis Services. But when I execute the project using the following connection string that points to the local cube file to be created, it gives me errors depending on the version of ADOMD library referenced.
conn.ConnectionString =
string.Format( "Provider=MSOLAP;Data Source={0}", "c:\\output\\mycube.cub" );
When referenced to ADOMD 11 library, I get the following errors:
OLE DB error: OLE DB or ODBC error: A network-related or instance-specific error has occurred while establishing a connection
to SQL Server. Server is not found or not accessible. Check if
instance name is correct and if SQL Server is configured to allow
remote connections. For more information see SQL Server Books Online.;
08001; Client unable to establish connection; 08001; Encryption not
supported on the client.; 08001.
Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'DB_NAME', Name of
'DB_NAME'.
When referenced to ADOMD 12 library, I get the following error:
A connection cannot be made. Ensure that the server is running.
Although, I know SQL Server Analysis Services are running when I checked in services.msc.
Figured it out. I was missing a reference to the assembly Microsoft.AnalysisServices.dll
I need to do SFTP from within a SQL Server context. I can do FTP with MS libraries, but they do not support SFTP.
So I downloaded Rebex, and put together a sample project, and tried to install it into SQL Server as a CLR stored procedure.
When doing this, SQL Server gives the following message:
Msg 6218, Level 16, State 2, Line 3
CREATE ASSEMBLY for assembly 'RebexTest' failed because assembly 'Rebex.Common' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message
[ : Rebex.Security.Certificates.CertificateStore::Exists][mdToken=0x60003b0]
[offset 0x000000C7] Method is not visible.
Is there a way to fix this so I can install it into SQL Server?
Unfortunately, Rebex components can only be used in CLR procedures with the PERMISSION_SET = UNSAFE option. See detailed explanation on the Rebex support forum.