JDBC connectivity with a mysql database

I created a MySQL database, but I have problems with communication with the DB in java

Here is the error

java.sql.SQLException: no suitable driver found for jdbc:mysql://localhost:3306 / books

at java.sql.DriverManager.getConnection(DriverManager.java:604)

at java.sql.DriverManager.getConnection(DriverManager.java:221)

to displayauthors. DisplayAuthors.main (DisplayAuthors.java:30)

java.lang.NullPointerException

to displayauthors. DisplayAuthors.main (DisplayAuthors.java:66)

BUILD successful (total time: 1 second)

---

I edited windowds system variables

CLASSPATH

.; C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip

CLASSPATH1 (note the 1 at the end, I don't want to replace the previous

., C:\Program Files (x 86) \MySQL\Connector J 5.1.30\mysql-connector-java-5.1.30-bin.jar

---

Host name: localhost Port: 3306

User name: root

password: Tpswsd77? (changed to thios post)

Stored connection: Instance local MySQL56

Connection method: Standard (TCP/IP)

HERE IS THE CODE

public class DisplayAuthors {}

Database URL

public static final String DATABASE_URL = "jdbc:mysql://localhost:3306 / books."

Launch the application

Public Shared Sub main (String args [])

{

Fitting out = null; corresponds to a connection

Statement statement = null; query statement

ResultSet resultSet = null; manages the results

connect to the database books and database query

Try

{

establish a connection to the database

connection = DriverManager.getConnection)

DATABASE_URL, "deitel', 'deitel'sc');

< defaultstate editor-fold = "collapsed" desc = "comment" >

DATABASE_URL, 'root', 'Tpswsd77?');

< / Publisher-trick >

CREATE statement to query the database

Statement = connection.createStatement ();

query database

resultSet = statement.executeQuery)

"SELECT authorID, firstName, lastName FROM authors");

process query results

ResultSetMetaData metaData = resultSet.getMetaData ();

int numberOfColumns = metaData.getColumnCount ();

System.out.println ("Table Authors of books database: \n");

for (int i = 1; i < = numberOfColumns; i ++)

System.out.printf ("%-8s\t", metaData.getColumnName (i));

System.out.println ();

While (resultSet.next ())

{

for (int i = 1; i < = numberOfColumns; i ++)

System.out.printf ("%-8s\t", resultSet.getObject (i));

System.out.println ();

} / / end while

} / / end try

catch (SQLException sqlException)

{

sqlException.printStackTrace ();

} / / end of capture

Finally / / resultSet, statement and connection are closed to this

{

Try

{

resultSet.close ();

Statement.Close ();

Connection.Close;

} / / end try

catch (System.Exception Exception)

{

exception.printStackTrace ();

} / / end of capture

} / / end finally

} / / main end

} / / end of class DisplayAuthors

Given that you seem to be running from netbeans, you would better add the jar to the project libraries...

And NO, you should NEVER put anything in your system classpath. It's a very bad habit, led to the equivalent of Java of the DLL hell and of course from the moment that you distribute the application to any other machine that's going to fail again.

Add it instead of the specific CLASSPATH of the application.

And do not put anything on the class path that has spaces in the name, it is no longer can cause problems, but don't count on that it works.

Tags: Java

Similar Questions

  • change the port connection to the mysql database settings

    Hello

    I created a mysql database on my hosting server, very basic, and I'm trying to connect to it. However receive a 404 error trying to test the connection. checked the settings with the hosting provider and all correct, they said to check that it does not try to connect on port 80 and should be the port 3306.

    How can I change this in the settings in dreamweaver cs4?

    Thank you very much

    Andy

    What happens if you try to create the connection to database from the server, rather than the site manager behaviors panel?

  • connection to the MySQL database

    Hello
    I have a Mysql database and I am trying to connect using DW. I set up a connection and filled in all the fields by following the instructions in the help section.

    The connection seems to be fine (and the connection seems to be the case) to the stage of "connect to the test database" when I get the following message is displayed. "an unidentified error has accurred.

    On the connection of database in the field "mySQL server", I put the following " http://64.151.210.1/localhost'. "
    The same thing happens if I just "localhost".
    The rest of the details are my standard remote connection information
    Any help gratefully received
    m

    Thanks for getting back to me so fast
    I tried, but I still get the "unidentified error".
    It is an online database that comes as part of my Web space.
    I have MySQL installed on my local computer to connect successfully, see tables etc.?
    m

  • UDL connection with relative path database file

    Hi all

    I use the shipper of the property to retrieve the test of the database settings. I Specifies the database to read by using a .udl file.

    When opening a connection to database (using the step of database type) open I'm able to specify the location of the .udl file as follows:

    "FILE NAME=C:\\Development\\IW_EST_2\\TesterSoftware\\TS\\Database\\DatabaseConnection.udl;"

    It works fine for now. However, I'm developing on the computer that will be deployed on the sequence. It is for this reason that I would use a relative path.

    Is it possible to do? If so, how?

    Thank you very much

    Cam.

    You can use a UNC naming convention to specify the location of the UDL.

    A UNC name will replace a drive letter with a machine name and the share name.

    Example of a connection string, I use every day:

    "FILE NAME=\\\netapp1\\shared\\STE\\SPOTS.udl".

    (note that the quadruple backslashes before the name of machine)

  • connection to the MySQL database on the server

    I use Dreamweaver CS3. I am trying to connect to the database on a hosting server. I did in the past, but on a different computer. When I get to the mySQL login window and I get the informaiton I get this error:

    HTTP 404 File not found error code. Here are a few possible reasons for the problem:

    (1) there is no server running on the server test.
    (2) the testing server specified for this site is not mapped to the URL http://207.45.187.42/_mmServerScripts/MMHTTPDB.asp . Check that the URL prefix corresponds to the root of the site.

    Website hosting said it's the path correct http://207.45.187.42/~denise/_mmServerScripts/MMHTTPDB.php, but I get the same error from him.

    When I configured the test server I've filled in the host field, but have you tried /public_html/ which is the directory of the host for the rest of the site. I get the same error as above.

    A thread in the forum suggested that you need to install MySQL in the IIS directory. My new computer does not have the version of Vist to do.

    Lost and confused.

    It took a while, but I finally thought to it. Under Server site/tests definitions in the prefix of the url I put the ip address of the Web site as well as the root folder. I had to ask the server what it was because it was different from what they use me to load up my documents. In my case, it is the ip address / ~ denise.

    After that everything worked fine.

  • DW connection to the mysql database: "databases" and "bindings" Panel disappeared

    I have a new website and a new PHP page, but why can't I find the "databases" or the "bindings panel" linking DW to the database? How can I fix?

    Moved to the main Dreamweaver Support Forum.

    You don't say which version of Dreamweaver that you use, but the screenshot indicates that it is an older version that has always installed obsolete server behaviors. If you have set the site properly, panels should normally appear in a PHP page. Your screenshot shows the missing. Have you tried opening the panels in the window menu? I don't have an old version of DW installed, but it should be something like window > PHP > just window or databases > databases.

    You should be aware of the fact that the code generated by Dreamweaver server behaviors relies on functions that have been removed from the PHP 7. Your sites will stop working as soon as your host upgrades the version of PHP on your server.

  • How can I fix an 'Access denied' error when connecting to mySQL database to a site (I'm sure I can get...)

    Hello

    I had a search on the forums and I don't see anyone with the same problem so I apologize if this has been asked before.

    I need to connect a database to a Web site so that members can register and save it to some pages (not all pages - only a 'members only' section).

    I created the database, tested and it works very well (I used XAMMP/PHPmyAdmin).

    In DreamWeaver CS6, I chose the type of document from the page (PHP) and set up the testing server. If I go to site Configuration > server for the site and click on test, it connects successfully. Note that the test server is hosted at the University, that I work - there is a password required, but I entered it on the test set up server and it seems connects very well, as I get the message successfully at this stage.

    When I go to connect the mySQL connection and select the database I get the error "access is denied. The file exists may not, or there could be a permission problem. Make sure you have permission on the server and the server is properly configured. »

    Any ideas? It's driving me crazy!

    I understand that after several unsuccessful searches on Google, so I post the solution here for someone else with the same question that could end up here.

    If you configure your test server in the inetpub/wwwroot/folder then Dreamweaver cannot make changes (such as adding files) unless you are running as an administrator, so it occurred to me that maybe the database connections are also affected.  Of course, as soon as I leave Dreamweaver and restarted as an administrator, I was able to connect to the MySQL database using the databases Panel.  If you don't know how to run a program as an administrator, it is pretty easy: just right click on Dreamweaver icon and select "Run As Administrator" when you start the program.  There are a lot of tutorials out there that can give you the necessary steps for always loads a program as an administrator if you don't do right click every time.

    Version: Dreamweaver CC 2015.

  • Problem, try to connect to oracle to mysql database

    Hello

    I need assistance with the configuration, I'm trying to connect to an oracle 11 g r2 windows to a linux mysql 5.5, but I'm having a lot of questions, here, I'll put the configuration.
    How thanks for everyone's trying to help me!

    Here is my tnsname.ora:
    tnsnames.ora # Network Configuration file: C:\app\Administrador\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.

    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    )
    )

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = gabriel-103eff2)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )
    ms_connection =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp) (HOST = gabriel-103eff2)(PORT=1521))
    (CONNECT_DATA = (SID = ms))
    (HS = OK)
    )



    Here's my listener.ora:

    listener.ora # Network Configuration file: C:\app\Administrador\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\app\Administrador\product\11.2.0\dbhome_1)
    (= Extproc PROGRAM)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrador\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
    (SID_NAME = ms)
    (ORACLE_HOME=C:\app\Administrador\product\11.2.0\dbhome_1)
    (PROGRAM = dg4odbc)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP) (HOST = gabriel-103eff2)(PORT = 1521))
    )
    )

    ADR_BASE_LISTENER = C:\app\Administrador



    Here's the init*.ora:

    # This is an example of initialization file of the agent that contains the HS settings
    # necessary for the database to ODBC gateway

    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = ms
    HS_FDS_TRACE_LEVEL = debug


    #
    # Required for the non-Oracle system environment variables
    #
    #set < varenv > = < value >



    Here is the fix:



    Oracle Corporation - SEXTA-FEIRA 17:18:13.390 January 4, 2013


    Heterogeneous Agent release
    11.2.0.1.0




    Oracle Corporation - SEXTA-FEIRA 17:18:13.390 January 4, 2013

    Version 11.2.0.1.0

    Hgogprd entries
    HOSGIP to 'HS_FDS_TRACE_LEVEL' returned 'debug '.
    Hgosdip entries
    default assignment of 50 HS_OPEN_CURSORS
    setting HS_FDS_RECOVERY_ACCOUNT or 'RECOVER '.
    HS_FDS_RECOVERY_PWD layout to the default
    default HS_FDS_TRANSACTION_LOG of HS_TRANSACTION_LOG layout
    HS_IDLE_TIMEOUT layout to the default 0 value
    layout by default HS_FDS_TRANSACTION_ISOLATION of "READ_COMMITTED".
    layout default HS_NLS_NCHAR to "UCS2".
    layout HS_FDS_TIMESTAMP_MAPPING default 'DATE '.
    layout HS_FDS_DATE_MAPPING default 'DATE '.
    layout HS_RPC_FETCH_REBLOCKING failure to 'ON '.
    HS_FDS_FETCH_ROWS layout without '100 '.
    parameter HS_FDS_RESULTSET_SUPPORT default 'FALSE '.
    parameter HS_FDS_RSET_RETURN_ROWCOUNT default 'FALSE '.
    parameter HS_FDS_PROC_IS_FUNC default 'FALSE '.
    parameter HS_FDS_CHARACTER_SEMANTICS default 'FALSE '.
    parameter HS_FDS_MAP_NCHAR if there is no 'TRUE '.
    setting HS_NLS_DATE_FORMAT or 'YYYY-MM-DD HH24:MI:SS ".
    parameter HS_FDS_REPORT_REAL_AS_DOUBLE default 'FALSE '.
    HS_LONG_PIECE_TRANSFER_SIZE layout without "65536".
    parameter HS_SQL_HANDLE_STMT_REUSE default 'FALSE '.
    parameter HS_FDS_QUERY_DRIVER if there is no 'TRUE '.
    parameter HS_FDS_SUPPORT_STATISTICS default 'FALSE '.
    The HS_FDS_QUOTE_IDENTIFIER parameter is not defined
    setting in HS_KEEP_REMOTE_COLUMN_SIZE if 'OFF '.
    parameter HS_FDS_GRAPHIC_TO_MBCS default 'FALSE '.
    parameter HS_FDS_MBCS_TO_GRAPHIC default 'FALSE '.
    Default value of 32 assumed for HS_FDS_SQLLEN_INTERPRETATION
    HS_CALL_NAME_ISP layout "gtw$: SQLTables; GTW$: SQLColumns. GTW$: SQLPrimaryKeys. GTW$: SQLForeignKeys. GTW$: SQLProcedures. GTW$: SQLStatistics; "gtw$: SQLGetInfo.
    parameter HS_FDS_DELAYED_OPEN if there is no 'TRUE '.
    HS_FDS_WORKAROUNDS layout by default "0".
    Release of hgosdip, rc = 0
    ORACLE_SID is "ms."
    Product information:
    Port RLS / Upd:1 / 0 PrdStat:0
    Agent: Oracle Database Gateway for ODBC
    : Installation
    Class: ODBC, ClassVsn:11.2.0.1.0_0008, Instance: ms
    Release of hgogprd, rc = 0
    Hgoinit entries
    HOCXU_COMP_CSET = 1
    HOCXU_DRV_CSET = 178
    HOCXU_DRV_NCHAR = 1000
    HOCXU_DB_CSET = 873
    HOCXU_SEM_VER = 112000
    Entry hgolofn to 2013/01/04-17: 18:14
    Release of hgolofn, rc = 0 to 2013/01/04-17: 18:14
    HOSGIP to 'HS_OPEN_CURSORS' returned '50 '.
    HOSGIP to 'HS_FDS_FETCH_ROWS' returned '100 '.
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536".
    HOSGIP to 'HS_NLS_NUMERIC_CHARACTER' returned '. "
    HOSGIP to 'HS_KEEP_REMOTE_COLUMN_SIZE' returned 'OFF '.
    HOSGIP for "HS_FDS_DELAYED_OPEN" returns 'TRUE '.
    HOSGIP to 'HS_FDS_WORKAROUNDS' returned '0 '.
    HOSGIP to 'HS_FDS_MBCS_TO_GRAPHIC' returned 'FALSE '.
    HOSGIP to 'HS_FDS_GRAPHIC_TO_MBCS' returned 'FALSE '.
    Invalid value of 32 for HS_FDS_SQLLEN_INTERPRETATION
    treat_SQLLEN_as_compiled = 1
    Release of hgoinit, rc = 0 to 2013/01/04-17: 18:14
    Entry hgolgon to 2013/01/04-17: 18:14
    Reco:0, tflag:0, name: SYSTEM
    Entry hgosuec to 2013/01/04-17: 18:14
    Release of hgosuec, rc = 0 to 2013/01/04-17: 18:14
    HOSGIP to 'HS_FDS_RECOVERY_ACCOUNT' returned 'RECOVER '.
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returns "HS_TRANSACTION_LOG".
    HOSGIP to 'HS_FDS_TIMESTAMP_MAPPING' returned 'DATE '.
    HOSGIP to 'HS_FDS_DATE_MAPPING' returned 'DATE '.
    HOSGIP to 'HS_FDS_CHARACTER_SEMANTICS' returned 'FALSE '.
    HOSGIP for "HS_FDS_MAP_NCHAR" returns 'TRUE '.
    HOSGIP to 'HS_FDS_RESULTSET_SUPPORT' returned 'FALSE '.
    HOSGIP to 'HS_FDS_RSET_RETURN_ROWCOUNT' returned 'FALSE '.
    HOSGIP to 'HS_FDS_PROC_IS_FUNC' returned 'FALSE '.
    HOSGIP to 'HS_FDS_REPORT_REAL_AS_DOUBLE' returned 'FALSE '.
    using the SYSTEM as default value to "HS_FDS_DEFAULT_OWNER".
    HOSGIP to 'HS_SQL_HANDLE_STMT_REUSE' returned 'FALSE '.
    Entry hgocont to 2013/01/04-17: 18:14
    HS_FDS_CONNECT_INFO = "msodbc".
    RC =-1 of HOSGIP for 'HS_FDS_CONNECT_STRING '.
    Entry hgogenconstr to 2013/01/04-17: 18:14
    DSN:msodbc, name: SYSTEM
    OPTN:
    Entry hgocip to 2013/01/04-17: 18:14
    DSN:msodbc
    Release of hgocip, rc = 0 to 2013/01/04-17: 18:14
    Release of hgogenconstr, rc = 0 to 2013/01/04-17: 18:14
    Entry hgopoer to 2013/01/04-17: 18:14
    hgopoer, line 233: had native error 0 and sqlstate IM002; message follows...
    [Microsoft] [ODBC driver manager] Nome da dados nao e found melting nenhum driver padrão especificado {IM002}
    Release of hgopoer, rc = 0 to 2013/01/04-17: 18:14
    hgocont, line 2753: call SqlDriverConnect obtained sqlstate IM002
    Out of hgocont, rc = 28500 to 2013/01/04-17: 18:15 with the ptr error FILE: hgocont.c LINE: 2773 ID: something else that permission is not valid
    Out of hgolgon, rc = 28500 to 2013/01/04-17: 18:15 with the ptr error FILE: hgolgon.c LINE: 781 ID:Calling hgocont
    Entry hgoexit to 2013/01/04-17: 18:15
    Release of hgoexit, rc = 0

    ______________________________________________________

    When I use tnsping ms_connection


    C:\Documents and Settings\Administrador > tnsping ms_connection

    AMT Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
    013 09:04:29

    Copyright (c) 1997, 2010, Oracle. All rights reserved.

    Archives of Parometros books:


    Used o useful TNSNAMES para resolver o apelido
    Contatar trying (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = gabriel-103eff2
    () (PORT = 1521)) (CONNECT_DATA = (SID = ms)) (HS = OK))
    OK (0 ms)





    Thank you very much!!!

    Hello
    The error in your gateway trace file-

    [Microsoft] [ODBC driver manager] Nome da dados nao e found melting nenhum driver padrão especificado {IM002}

    translates-

    Data Source name not found and no driver by default specified

    This means that you don't have a system DSN defined on the Windows machine called "ms", which uses a MySQL ODBC driver to connect to the MySQL database on your Linux machine.
    The system DSN to be used is defined by the parameter-

    HS_FDS_CONNECT_INFO = ms

    Therefore, you must perform the following operations

    -install a driver Windows ODBC de MySQL
    -define a DSN system whichuses this driver to connect to your MYSQL Linux
    -Use this DSN as parameter HS_FDS_CONNECT_INFO

    You must ensure that the DSN can connect to MYSQL without Oracle involved before DG4ODBC can also establish a connection.

    Kind regards
    Mike

  • mobile applications with phonegap + mysql?

    Hello

    I was looking for a long time but did not find the answer. is it possible to display content based on data in mobile applications with dreamweaver cs6?

    If so, are there examples or tutorials on the adobesite or elsewhere?

    Future prospects for any answer :-)

    PhoneGap built mobile applications with HTML, CSS and JavaScript. You cannot use a language server side, such as PHP with PhoneGap.

    Most likely, you want to connect to a MySQL database on a remote server. To do this, you will need to use Ajax to send and receive data from the MySQL database. You can use jQuery to send and receive data in JSON format. PHP has a JSON functions which decode and encode data as JSON strings.

    How difficult or easy, you would put that in place depends on your knowledge of jQuery and PHP. I don't know any tutorials that explain how to get together it for PhoneGap, but it shouldn't be too hard to find tutorials to use jQuery Ajax to communicate with MySQL.

  • Connect to GoDaddy/MySQL

    I'll build a Web site that needs to connect to a MySQL database. I created the db and a table on the server host (GoDaddy), I also created a form on the website of the host server, now I need to create a login record. I complete the information requested in DW CS4, click 'Test' and it does not immediately with "an unidentified error has occurred". The speed of error message tells me that he is even not to reach the server so I wonder if there are other settings I should use. Those I have is:

    • Name of the connection
    • MySQL Server
    • Username
    • Password
    • Database

    I checked the connection file and compared with other hosts I use, the only difference seems to be that the other host has an IP address for the MySQL (I tried to use the ip address that is provided by GoDaddy and had the same error message.

    I'm at a loss to know where to look next. Any ideas I would really appreciate. With the help of DW CS4 / Win7

    Thank you

    Tony

    Okay, I never thought I'd be happy to see an "http: 503 Service unavailable" error message - but it's better than "unidentified error"! It turned out that I had not defined PHP MySQL as the server to the test server model in the site definition. Search on Google, he said that it was a temporary condition which should dissipate on its own. So far one hour has elapsed and no luck. Next stop will be GoDaddy Tech Support - for the 4th time in this saga!

    After an hour or two with Stephen, a very useful to GoDaddy tech support guy, none of us could understand what was wrong, so we decided that the best way forward was to try to redefine the new site in DW and pointing to the site under development. It worked.

  • Insert data in mysql database

    Hello world

    I searched all over the internet for solutions to my problems, but it is not easy to find good explanations of how things work with databases.

    So, here's the situation:

    I had a (built with LC designer 8.0) form with a button of HTTPsubmit linked to a php script which would address all communications to my mySQL database. Everything works very well for that.

    now, I have a second form and wanted to do the same. But on this new form, I have a few paintings repeated data with the same name (each row has the same nodes), and the HTTP POST method will give me only one of the data. I could change the name of each node to make it unique, but 1. It takes some time and 2. It is not a very clean solution

    So, I tried to set up the famous "DataConnection" I've tried to avoid in the first instance. I've successfully installed mySQL ODBC connector and communication between the form and the database is perfectly fine. But I understand that, in the 'method' of DataConnection each field of the form corresponds to a field in the database. While I would like to insert a new section of mySQL for each line of my paintings.

    This is where I am stuck. I thought of two methods:

    1. I am a newbie with DataConnection so maybe there's a way to do what I want, but I don't know. Ideally, I guess something like this: "OK, there is good communication with the mySQL database. When I click on the "submit" button, move forward with javascript code that collects information from the form and gives a request for INSERTION in the mySQLdatabase; "and that for each row in the table. Collection of information is no problem, but how should I handle these multiple query "INSERT"?

    2. perhaps, it is also a way to change the submit button, so that the data is sent to a php server side or a js script, but instead of having urlencoded method or the HTTP POST method, send the code over XML data and the script will deal with it. In fact, I know that this change is possible; but I have no idea on how to manage the data from the form, if this isn't HTTP POST (or GET). If I choose a shipment to a php script, and I send XML or XDP, what is sent to the script?

    Well, thank you in advance if I finally find a solution!

    tguiot.

    OK nevermind, I found the solution with an appropriate method. Here is the link where I found what I needed: http://blogs.adobe.com/formbuilder/2006/12/databases_ins_upd_del.html

    That's exactly what I planned to do, but it is indeed a more advanced manipulation of the database connection object. Here's the idea:

    • create a DataConnection to your database, using the standard method (in my case, using the mySQL ODBC connector)
    • create a copy of the DataConnection object and clean it (to remove all unnecessary nodes)
    • Change the value of the
    • Run the SQL with the method 'Open'

    in the link provided, you will find the pdf file to open it with livecycle designer. There is a "Database" variable which contains the functions, and the code is commented pretty precisely.

    All I now need to do is navigate in my table and execute an insert sql for each line.

    So good to finally have a solution!

    Thanks anyway for your help pguerett.

  • On the remote host MySQL database: password encryption?

    Hello

    I discovered the world of PHP and MySQL in the last days. I didn't get all the intricacies still but nevertheless I managed to set up a server "localhost" on my computer, create a MySQL database and display correctly information in this database in HTML using PHP pages.

    I am now at the stage of transferring it to the remote host where the site will happen: I exported my database, imported these information in the database on the server host and I n unexpectedily even just to get my PHP/HTML pages to connect to this database. It's great.

    I have one question. I've read a lot of thread in this forum about this, but haven't seen an answer: must the password encryption? I mean, when I connect to a database using DW CS4, the software creates for me a connections folder in my Web site root folder and stores inside a little PHP to the folder with the server name, database name, user name and password which are necessary to allow PHP to connect to the MySQL database. It is all printed clearly in there. Once which is transferred to the remote host, it is always accessible to anyone? Should I not worry and try to hide the password?

    Any thoughts on this would be greatly appreciated.

    Emilie

    Thread moved to Dreamweaver application development forum, which addresses other issues aside and PHP/MySQL server.

    As long as the server is enabled in PHP, put the connection details in a PHP file like this is not a problem. PHP code is processed on the server. Only its output is sent to the browser. Even if someone guesses the name of your connection file, they won't see anything if they try to load the page in a browser. The only way they can see it is to hack into the server. It is important to have passwords on your FTP account.

  • DreamweaverMX and a MySQL database

    Hello

    I am trying to connect to my MySQL database in DreamwaeverMX.

    When I try to add the MySQL connection I put data as follows.

    Login name: connTrio
    Server name: localhost
    User name: root
    Password: password

    I get error message "the schooner error has occurred" when I try to select the database.

    I can confirm that the database is present, mysql is running, used password is correct.

    I hope someone can help

    Best regards

    Martin

    Hello
    The "nightmare" is over!
    Found this Wamp server set up

    http://www.wampserver.com/en/download.php

    100% working in less than 10 minutes!

  • How to set up the MySQL database to connect from another computer?

    Hello

    I have a huge problem with that.

    What I want to do is:

    I want to create a system (in LabWindows/CVI) this will (among others) allow users to send simple messages to each other. So I want to create a MySQL database , which will be based on a server. Other computers running the system then is able to remotely connect to this database and read a certain table to see if they have new messages. I want that the client computer to connect through the LAN to the database on the server.

    But how can I do this?

    1. How to create a database that can be connected through the LAN?

    2. How my connection string should look like not on the client computer?

    3. What configurations on the client and server computers can I do?

    Any help is appreciated, and if you could suggest how can I do to reach my goal. I'm a very competent programmer, but HATE those network things.

    Thank you

    Umer

    Nothing really associated with LabWindows. Try http://dev.mysql.com/doc/refman/5.7/en/tutorial.html for the database installed and running on a server.

  • To connect to an Oracle database using oracle.jdbc.OracleDriver: error

    Hello

    I am trying to connect to an Oracle database so that we can extract information on tables, views, and packages.

    Using the Data Modeler (transformation script) API, we will add these notes to the corresponding objects in the Data Modeler.

    I'll start with this:

    importPackage (java.lang);

    importPackage (java.awt);

    importPackage (java.sql);

    java.lang.Class.forName ("oracle.jdbc.OracleDriver");

    An error occurs when I run this code:

    test.png

    It must be something of Java...

    Someone at - it a suggestion?

    Problem solved! A colleague of mine referred to in this post: import def properties from Oracle Designer

    More in detail: it's this couple of lines:

    Copy the file ojdbc6.jar for... Directory of \datamodeler-home\jlib

    Add this line to datamodeler.conf

    AddJavaLibFile... /... /jlib/ojdbc6.jar

    I changed my file datamodeler.conf, DM rebooted and now is no longer an error when I try to use the Oracle JDBC drive.

Maybe you are looking for