I'm using Visual Studio 2015 & Syabse ASA DB (ver 16.0.0.2222) alongwith EntityFramework 6.1.3.
I add an ADO.NET Entity Data Model
-> I choose EF Designer from Database
-> Establish a New Connection
-> Select the option to Include information in Connection String
-> Click Next -> Ideally the next window should allow me to add Tables/Views/Procedures but Upon clicking Next the window closes.
You may check this link to understand my issue better (only difference is I'm on Visual Studio 2015 & the DB I'm using as Sybase ASA)- https://www.youtube.com/watch?v=4SwhYYAzx6I
Has anyone come across this kind of problem or know how to fix this?
Kindly advise.
I think you need the connector for avoid this.
You can try this:
Download the "Get a Free "Developer" Edition" here: http://scn.sap.com/community/developer-center/oltp-db
Choose Custom Install when installing.
Only install the .Net ADO package from the custom install.
Reference the Sybase.AdoNet4.AseClient.dll in your solution from where the install put the files on your drive.
After that you should be able to perform queries, updates etc. in your solution.
Read this if needed: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sdk_12.5.1.adonet/html/adonet/DAFJEFIF.htm
Hope this help.
I came across the solution & posting it so that it may help others.
What I already had done?
Install the latest developer edition from Sybase
Use command prompt with admin priviliges.
Naviagte to the path where SQL Anywhere (Sybase ASA) is installed containing the DLL's (in my case: C:/ProgramFiles/SQL Anywhere 16/Assemble/V4)
Execute SetupVsPackage.Exe -i -v 6
Update app.config file to match the latest provider.
Install EntityFramework 6.1.3 to the project where I would add EDMX file.
What I missed?
After step 4 above I had to run an additional command -
Execute SetupVsPackage.Exe -i -v EF6 (EF in caps)
Related
When I try to set SqlDataSource I've got provider error. Server connection checked and it works
Editor image:
Error message image:
Problem is similar to this thread but recommended fix doesn't work and IDK what to do
Error picture from thread above
I've installed MySQL connector, MySQL for Visual Studio, but it doesn't help to me
UPD: Here's a minimal project with an SQL DB (var_23.sql). In Web.config described a connecting to DB, the "Doctors" page has a SqlDataSource element, that do connection
From my experience, Please install "Data storage and processing" in visual studio installer.
If the corresponding package is missing during the compilation process, use Alt+enter to pop up a quick prompt to add it (you could also right-click Reference->Manage Nuget Packages to add the corresponding package)
Updated:
It turns out that I can run your program correctly, I downloaded a community version of mysql 8.0, and imported your database.
Because you create in Framework, I suggest you can remove providerName="MySql.Data.MySqlClient".
Please let me know if I misunderstood your question.
First off I have read other posts about connecting to an Oracle database, unfortunately they could not help me. I'll describe what I have tried and hopefully someone can point me in the correct direction.
First off I tried to install ODTwithODAC122010 as many sources are saying,but this one gives me a few process exited with non zero exit code. It says it's successful but nothing seems to be changed.
Next to that I tried installing ODTforVS2017_122010.exe I have an updated Visual Studio professional. It says the installation is a success. This however does not seems to add any option like tutorials describe. With this I mean that there should be something visible in;
visual studio tools -> connect to database -> Oracle database, data provider menu should have something like Oracle for.. This doesn't show up unfortunately..
So I tried connecting to the database in my visual studio project selecting the .net framework data provider for oracle. Here three fields are asked: Server name username and password. I tried filling them in but it couldn't connect.
For server name I used: IPADDRESS:PORT/SERVICENAME
After that I gave up hope for connecting to the database through visual studio (I can connect to the database using oracle SQL developer).
Then I installing the following nuget packages:
- Oracle.ManagedDataAccess
- System.Configuration.ConfigurationManager
- System.Security.Permissions
- System.Security.Principal
And wrote a piece of code to connect to the database like:
using(OracleConnection connect = new OracleConnection(ConnectionDetails.returnConnectionString()))
{
connect.Open();
Console.WriteLine("did it work?" + connect.ServerVersion);
}
Where returnConnectionString returns:
"User Id=MYID;Password=MYPASSWORD;Data Source=IPADDRESS:PORT/SERVICENAME"
Unfortunately when I try to run this I'm facing a ExecutionContext.cs not found. This is happening at connect.open();
I'm launching this code at:
public static void Main(string[] args)
{
var a = new DatabaseConnector();
a.test();
BuildWebHost(args).Run();
}
As I final word I want to make it clear that I'm using ASP.NET Core and that your suggestions and help will be greatly appreciated!
To be precise,
Right click on your project
Go to Manage NuGet packages
Search for Oracle.manageddataaccess.core . You will get Nuget package 2.12.0-beta2 version. Add it.
In the page, import as below to access oracle classes
using Oracle.ManagedDataAccess.Client;
This is a beta version of Oracle data access provider and PROD version is supposed to be available at the end of 3rd quarter of 2018.
There's currently no ODP.NET support for .NET Core, it was suppose to be released last year, but there's been no news more than and it's coming tweet from the ODP twitter account a couple of weeks ago.
You can make the current version work by moving your project from .netcoreapp2 to a net461 or higher target framework, but it would remove the cross platform support from your project.
In order to move your project to .net461 or any other follow this steps:
Edit your csproj file and replace the TargetFramework with net461
If you have a web project then remove the Microsoft.AspNetCore.All package and install the Microsoft.AspNetCore (which should download the others dependencies).
At the time of asking this question there was no driver Roy Sanchez answered that. A few weeks the driver got released on the oracle site and a as a nuget package.
I've been getting an error while trying to generate a MySQL database from my ADO.NET Entity Model. I've setup a connection properly and can connect to it through my Server Explorer. Also the settings in the model seem correct: T4 Code generation strate, Database schema name is correct and the DDL Generation Template is set to SSDLToMySQL.tt.
Also i cannot seem to map Entities to tables, the dropdown remains empty.
This is the error message:
I've yet to find a solution and hope someone could help me out :)
I'm new to EF and C#/VS etc.
Cheers,
I found a solution on the MySQL bug pages.
Here goes:
Additionally there's a workaround:
On the machine where VS 2013 is installed, VS plugin (1.1.3 GA) and
Connector/Net please do the following:
Note: close all VS instances before doing the steps.
On a Windows Explorer window go to this path or wherever the
Connector/Net binaries were installed to. By default this is the
location:
C:\Program Files (x86)\MySQL\MySQL Connector Net
6.8.3\Assemblies\v4.5\
Copy the file:
MySql.Data.Entity.EF6.dll
And paste it to this folder
C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies
If it asks to overwrite it please do so.
In order to copy the file administrator rights are necessary.
Then you can try again to generate the script for your model. It
should work fine.
It is important to have the 1.1.3 version of the VS plugin installed
since this workaround is for that. The download link is at:
http://dev.mysql.com/downloads/windows/installer/
Taken from the following page: http://bugs.mysql.com/bug.php?id=71427.
I have a project in visual studio ultimate 2010 (MVVM) and database, in SQLITE.
Everything worked fine, but now I have a problem with the ADO.NET Entity Data Model.
I searched for information about this and have not found much .. Every time I want to open the wizard, it just closes.
I think I should reinstall Visual Studio, but before doing so if anyone has had this error before and know what can be, I'd be grateful.
I've found this can be a bug with third party data adapters being left in strange states. Open your View > Server Explorer and remove your third-party data connections. Then, try opening the wizard again.
I had this problem with VS 2013 (Entity Model Wizard disappearing). I solved it by first uninstalling the MySQL .NET/Connector (I had 6.8.3) and installing it back, and then retrying the wizard. Wizard completes and I could select tables etc.
Try deleting the following file
c:\users\myusername\appdata\roaming\microsoft\visualstudio\10.0\SeverExplorer\DefaultView.SEView.
If you are creating a web application such as through MVC check the AttachDBFilename in web.config for characters such as |.
I had the same issue and was unable to resolve it by removing connections from Server Explorer.
I attached a visual studio debugger to visual studios.
Turned on CLI exceptions and turned off Just my Code.
I then saw the hidden exception.
The wizard was throwing an exception with the message "Invalid Character in Path" in System.IO.Path.CheckInvalidPathChars(string path, bool checkAdditional).
The value of path was "|DataDirectory|\\aspnet-Mvs4Dummy1-20140402113853.mdf".
I realised that this was the database that visual studios had automatically generated with my MVC application and that the offending character was probably the '|' symbol.
So I performed a Grep search of my directory and found that this was being stored in my web.config in this apparently unsupported format.
I changed the entry to a full local path and the wizard stopped disappearing.
Open VS,
View->Server Explorer and delete connections under the data connection files.
I had already this error before and solve it doing like this.
My solution for VS2015 was:
Install MySQL.NET Connector 6.9.8 to replace 6.9.5.
I already has installed MySQL for Visual Studio 1.2.6 and had got the appropratiate MySQL NuGet packages (MySQL.Data, MySQL.Data.Entity.EF6, MySQL.Web).
I solved the problem by doing some steps below:
1/ Open "Server Explorer" window in Visual Studio
2/ Delete all Connections under "Data Connections" sections
3/ Then, Add the ADO.net Entity Data Model as normal
I've reinstalled my laptop - Windows 7, VS2010, VS2010 SP1, SQL2008 and SQL2008 SP2.
I've also done windows updates - no updates available from update window anymore
The issue I've is: When I double click on the EDMX file it gets directly in to the XML. Why is that?
I don't get any error....
I can't do update from Database or add entities from Database etc....
I googled and found you should do open with and choose XML and then close XML and double click again. I've tried several options (open with ) and I don't get the UI Designer for my Entity Framework (edmx ) file.
I clicked on the properties of the file (*.edmx)
and I see Cusotmtool: EntityModelCodeGenerator and build action : EntityDeploy
I then right clicked on EDMX and choose 'Run Custom Tool" and then I receive this error
"cannot find custom tool 'EntityModelCodeGenerator' on this system."
I checked VS2010 and VS2010 SP1 is installed. I did again install from DVD and choose REPAIR and I still have this problem....
so what could be problem?
thanks
you had unchecked some of recommended features while installing the Visual Studio. Just Reinstall the visual studio to configure the features. after installation open the .edmx file with the "ADO.Net Entity Framwork designer".
Try devenv.exe option /resetskippkgs, then solve the error.
The question is about VS2010, but if you're looking at the same problem on a newer Visual Studio (e.g. VS2013), you probably need to reapply the latest VS update (worked for me) or reinstall VS.