I
I
ipokos2019-01-29 03:53:49
Java
ipokos, 2019-01-29 03:53:49

How to connect to MySQL (No suitable driver error)?

I am familiar with working with DB in java.
I installed JDBC and when connecting, the error java.sql.SQLException: No suitable driver found for jdbc: h2: ~/test
Tell me what I missed, how to connect correctly?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
IceJOKER, 2016-06-10
@i_am_mrld

Rather the latter.
Add both layouts to FrameLayout and switch between them with setVisibility(View | GONE)

R
Rou1997, 2016-06-10
@Rou1997

You can fix it if you put listeners on a new one, etc., but everything will turn out in a heap, so the concept is bad, one class - one layout, so you do either 2 fragments or 2 activities.

E
EVGENY T., 2019-01-29
@ipokos

Most likely, the jar file with jdbc drivers is not planted under your feet. Write it in the classpath or add it as a third-party library if you are working in an idea.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question