Good day everyone, I have been watching this video series as a guide line for my own netbeans e commerce project but at 27:00 the teacher test the data source but when I try to run the file one I got this error message.
“jakarta.servlet.jsp.JspException: Unable to get connection,
DataSource invalid: "java.sql.SQLException: No suitable driver found
for jdbc/OkStore2"”
I’m on windows 11. The program versions I’m using are Apache Netbeans IDE 16, MySQL WorkBench 8.0 CE, Eclipse GlassFish 6.2.5 (build 6.x-b66-g0159b68 2022-02-12T17:39:59+0000). My driver is mysql-connector-j-8.0.31.
https://www.youtube.com/watch?v=JlLGrqHSSjk&list=PLWS58wV27xi5AFrSfru26h4KWNMv1h2XA&index=7&ab_channel=CS.Math.Educator
error message
Failed solution
putting the driver jar manually into WEB-INF/lib
putting the driver jar manually into
\glassfish\domains\domain1\lib\ext\
I don't quite understand this driver thing for DB's.
First I was trying to connect DB using PHP normally using "mysql" methods but I was receiving error to update password for DB user as it was old MySQL. But I cant change it or upgrade MySQL so I found that in PHP I can use PDO and ODBC to use MySQL driver 3.51 and it works.
Now I want to rewrite back-end to asp.net Core 2. Where I found that there is no ODBC. How can I connect to DB? Can I use MySQL.DATA ? If yes how do I provide driver to it?
Unfortunately the last time I checked MySQL.Data does not have any stable (non prerelease) version to connect .net core to MySQL. However their prerelease versions work just fine. I have used it with a number of applications and faced no bugs yet. There are 4 ways to install the prerelease. You can pick any one:
In visual studio nuget manager, mark Include prerelease check box and then update MySQL.Data to the latest version.
In your Package Manager Console in visual studio, enter the following code to install the latest prerelease
Install-Package MySql.Data -Version 8.0.8-dmr
In command prompt, cd to your project location and use the following code for the latest prerelease
dotnet add package MySql.Data --version 8.0.8-dmr
Manually download your preferred version from here: https://www.nuget.org/packages/MySql.Data/
As of making the connection, I use the following format for the connection string.
Server=;Uid=;Database=;password=;SslMode=none
I am using mysql connection for a asp.net web application. So i installed mysql-connector-net-6.9.7.msi. Everything working fine for that project.
So I deployed that on web server and installed that mysql connector as well.
The application with MySQL connection works fine but other websites on web server are throwing error:
'Unable to connect to any of the specified MySQL hosts.'
(.net 4.0, EF 5.0)
Yourserver don't have 6.9.7 mysql connector , try installing 6.3.7 mysql connector on your server or use Entity framework 6
after two hours in internet i resolved this issue by removing sitemap section in machine.config file.
Thank you so much
I'm facing a trouble with Windows 8.
I've an application in VB6 using SQL Server 2008 through the net with SQLNCLI10 provider, which I always install with sqlncli10.msi, but when I tried to install in a PC with Windows 8, I can't... said something it's no more supported.
I use ADO for connection, and the string connection is:
Provider=SQLNCLI10;Server=SERVER\SQLEXPRESS;Database=MyDataBase;
Any ideas?
Are you installing on a 64-bit machine? If you are, you may need to create a reference directly to the C:\Windows\SysWow64\sqlncli.dll.
Does any one know how to connect to MySQL 5.1 with Visual Studio 2010?
I have already tried the MySQL Connector/ODBC route and it got me really nasty results. The table rows were all listed as a view in the views section and nothing at all was listed in the tables or procedures folder.
To get the Entity Frame working with VS2010, I had to do the following:
This only worked with Mysql .net Connector v6.3.1 (alpha). Previous versions ignored VS 2010 (click Development Releases)
I had to rename my Framework\v1.1.4322\CONFIG folder. Otherwise the install will fail. Rename it back when finished
(I've blogged about this here)
Update
6.3.2 is in beta and I can confirm this works. (I didn't need to rename the framework folder)
this seems to solve the issue
UPDATED LINK TO LATEST RELEASE THANKS #Christian Payne
Update: looks like there is already a non-beta!!!!
http://www.mysql.com/downloads/connector/net/
As someone else suggests..
http://dev.mysql.com/downloads/mirror.php?id=382641
..fixes the problem.
I had v6.2.3 installed after I had vs2010 installed and the MySQL driver was not shown in the list of the Database Connect dialog. I wrongly assumed I should use the .NET ODBC drivers instead and it caused all sorts of problems. Although I could easily connect to the DB using codebehind, the server explorer wouldn't connect to the DB.
Luckily after uninstalling 6.2.3 and installing 6.3.0 (from the link above) the MySQL driver was added to VS2010, and I was able to connect to the database and see it in my server explorer.
http://bugs.mysql.com/bug.php?id=45122
I was able to get this to work by doing the following:
My Environment:
Development Box -- Win7 64bit,
VS2010 Pro
Deployment Box -- Win2k8 svr with IIS7
running ASP.NET .Net 2.0/3.0/3.5 sp which is
hosted at DiscountAsp.Net (Note:
DiscountAsp.Net does not provide a
MySQL DB when running on a Win2k8
svr, I'm using a MySQL DB that I connect
to elsewhere on the InterWebs)
Steps I took:
Installed MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
Ref'd the .Net 2.0 version of the MySQL assembly in my ASP.NET MVC2 Web project set to target .Net 3.5 (the path for the MySQL assemblies I used was C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v2.0)
I ref'd all 3 of the MySQL assemblies (MySql.Data.dll, MySql.Data.Entity.dll & MySql.Web.dll)
I marked each of those assemblies as "Copy Local=True" in my project (a.k.a bin deployment)
Added a MySQL DB connection string to my Project (using the MySQL provider)
Added an ADO.NET Entity Data Model to my project in VS2010 using the connections string
VS2010 took about 30 secs to chew thru my MySQL DB schema but then provided me with a beautiful GUI interface to tweak my MVC Models
Used the DB Entities in my MVC controllers
Deployed the app to my hosted server at DiscountAsp.Net
It works like a charm :)
Erm... through code? Or do you mean the server explorer add-in? Have you tried the latest (albeit GPL-ed) connector version for .NET from Mysql themselves? Again, it's GPL-ed so be aware of the consequences of using that for your own software.
Microsoft Visual Studio 2010 Beta 2 is busted for DDEX providers. They are auto promoting a VS 2008 assembly from 9.0 to 10.0 and it fails. The failure has to do with the fact that a .NET 2 assembly cannot load a .NET 4 assembly.
This worked in beta 1, so it is something they broke.
I even went back and tried the reference DDEX provider from the SDK. It won't load in VS 2010 beta 2 either. That tells me they have something that needs to be fixed.
When is the next beta?