How to create a DSN Less Connection using MySQL

Hi All
How to create a DSN Less Connection using MySQL?
http://www.caucho.com/projects/jdbc-mysql/index.xtp and downloaded Caucho driver and installed the jar ---- caucho-jdbc-mysql-0.2.7.jar in my classpath..
this is how i embedded the code
try
driver = (Driver) Class.forName("com.caucho-jdbc-mysql-0.2.7.Driver").newInstance();
catch (Exception e)
lastErr = "Cannot load the driver, reason:"+e.toString();
nothing seems to work with code..
Unable to proceed..Any piece of code would be of great help..
Thanks and regds
Gautam

According to the installation instructions for that driver:
The driver is com.caucho.jdbc.mysql.Driver
The url is jdbc:mysql-caucho://hostname:port/database
You used something else for the driver name. So it doesn't work. By the way, I found those instructions here: http://www.caucho.com/projects/jdbc-mysql/

Similar Messages

  • How to create a dsn less connection using a jsp

    hi,
    presently i have created a web site using jsp..i used a dsn connection to access the database.i used the basic jdbc:odbc type one driver..the issue is that when i tried to webhost my website they told me that i have to use a dsn less connection ....code anyone refer me the code as to how i could a dsn less connection jsp...i am using a access database..

    Well Friend,
    This is not the right form to post this query i would advice u to post this query in the JDBC thread
    If U are not satisfied with the resolution provided below
    Howevr as per my experience
    If U wanna use DSN less Connection U may go ahead and use TYPE II/III/IV drivers which would be Application(database) specific in general.
    u wud have to include the driver specific .jar files (to load drivers) in your classpath for few specific type of drivers like thin/OCI/.......
    And it wud be different for different Databases U can easily get information and downloadables about those drivers from db vendors web portals.
    Just for U reference check the links below
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
    http://forums.oracle.com/forums/thread.jspa;jsessionid=8d92200830de37db8191784349ff8c14cef5a6d94e36.e34QbhuKaxmMai0MaNeMb3aTbxz0?messageID=901133��
    http://www.kitebird.com/articles/jdbc.html
    http://www.developer.com/java/data/article.php/3417381
    http://www.akadia.com/services/sqlsrv_jdbc.html
    http://www.thescripts.com/forum/thread182937.html
    Else where U can make use of Hibernate/ EJB/.....
    which would include support for Dbconnection internally.

  • How to create a DSN-less connection to SQL Server for linked tables in Access

    hey
    i cant understand how i use that Function
    if that information what you need
     stLocalTableName: dbo_user_name
    stRemoteTableName: user_name
    stServer :sedo2015.mssql.somee.com
    stDatabase :sedo2015
    stUsername :sedo_menf_SQLLogin_1
    stPassword :123456789
    how will be that Function??
    please write that Function to me
    '//Name : AttachDSNLessTable
    '//Purpose : Create a linked table to SQL Server without using a DSN
    '//Parameters
    '// stLocalTableName: Name of the table that you are creating in the current database
    '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database
    '// stServer: Name of the SQL Server that you are linking to
    '// stDatabase: Name of the SQL Server database that you are linking to
    '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection
    '// stPassword: SQL Server user password
    Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String)
    On Error GoTo AttachDSNLessTable_Err
    Dim td As TableDef
    Dim stConnect As String
    For Each td In CurrentDb.TableDefs
    If td.Name = stLocalTableName Then
    CurrentDb.TableDefs.Delete stLocalTableName
    End If
    Next
    If Len(stUsername) = 0 Then
    '//Use trusted authentication if stUsername is not supplied.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes"
    Else
    '//WARNING: This will save the username and the password with the linked table information.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword
    End If
    Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect)
    CurrentDb.TableDefs.Append td
    AttachDSNLessTable = True
    Exit Function
    AttachDSNLessTable_Err:
    AttachDSNLessTable = False
    MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description
    End Function

    thanks more thanks for you
    look i add that code in form
    it worked but i cant add recored  why ??
    Private Sub Form_Open(Cancel As Integer)
    Call AttachDSNLessTable("dbo_user_name", "user_name", "sedo2015.mssql.somee.com", "sedo2015", "sedo_menf_SQLLogin_1", "123456789")
    End Sub

  • Example code - dsn less connection to MySQL ?

    Has anybody got any example code on how to connect to a MySQL
    database without using DSN ?
    eg. <cfset myconnectionstring="....
    My hosting company say they prefer me NOT to use a DSN. Do
    you think they're correct in saying this ?

    You can create a dsn less connection for access on a PRE-MX
    (ie ColdFusion 5.0) environment. CFMX does not currently allow for
    DNS-Less connections, due to a "restriction" with JDBC.
    So it seems that your hosting company are nutters! :) It is
    normal for your host to create the dsn themselves, however, it will
    be limited by the number of dbs you have. I imagie you can have up
    to 2 mysql dsns without charge, mssql will cost per db/dsn and
    access should be free for one dsn connection.
    HTHs

  • I need to create a DSN less connection to an oracle 10g database in coldFusion 10

    Can i use <Cfquery   dbtype =:dynamic Connectstring="">
    if so, where can I get examples of the Connectstring
    if not what other options are available

    I am planning to do my project on Linux with J2EE,Oracle technologies.You don't need to set up a DSN. Just use a JDBC connect string such as jdbc:oracle:thin:@localhost:1521:xe
    ~Jer

  • How to Create a system for connecting to mysql 5.0 in VC

    Hi
       I am new to SAP. I am working with SAP Netweaver 7 J2EE Version and Visual Composer. I defined systems in SAP EP but i am getting SSO error.
      I need to connect to Mysql 5.0 database.  I have to access that database in Visual Composer.
      Please help me for creating a system and Solving the SSO error.
      Any flash presentations or links or materials .. please provide me the link..
    Thanks
    Mohan

    Hi Mohan,
    You have to create and configure your system in the system administration tab in the portal.
    Usually, it looks like the following:
    System from template: JDBC System
    Connector properties
       Connection URL: jdbc:sap:sqlserver://<serverlocation>;DatabaseName=<database name>
       Driver class name: com.sap.portals.jdbc.sqlserver.SQLServerDriver
    User management properties
       User mapping type: admin, user
    Set the system with an alias.
    Go to user administration tab and map the user with VCRole to the configured system
    (the default for MSSQL is usauly user: sa and pw: admin)
    Save your changes and logon to VC with this user.
    The alias name should appear in your list of systems.
    Hope I helped,
    Shay

  • 10g - DSN Less Connect

    I'm looking for a way to use Microsoft odbc to create a dsn-less connection to an Oracle 10g database using vbscript. The script will run from client OS' on both XPsp2 (mdac2.8) and VistaBusiness-x32 (windows dac 6.0)
    The script will call a stored procedure that strips the colons, spaces, dashes or periods in the stored mac_address item then query the server with a mac address and receive the workstation name and a few other items stored in the db. I will be sending the mac address with no colons, etc.
    From what I've gleaned from other sources, the following should be close but I want to check before I go to my db guy for query help.
    strConnection="Driver={Microsoft ODBC for Oracle}; Server=OracleServerName;uid=username;pwd=password;"
    set conn=Server.CreateObject("ADODB.Connection")
    conn.Open strConnection
    Any code on executing the function and querying for the provided mac address would be helpful since I'm completely clueless... which comes first, the chicken or the egg..
    Shoot, even if someone would post code on how I can check if the connection is actually made..
    Thanks

    ...So I take it that I'll have to have the server
    export to csv or a db format that will provide a
    connection on a stock xp or vista box.I'm not sure exactly what you're saying here. Are you suggesting that you'd export the data on the server to a CSV file, copy that to a network share, and have your application create an ODBC connection to the CSV file?
    Are you wedded to installing absolutely nothing else? The Oracle Instant Client, for example, just requires copying 3 or 4 DLLs to a directory & setting some environment variables in order to install a minimal Oracle client and ODBC driver (though it won't work with the Microsoft ODBC driver for Oracle). That's normally a pretty minimal burden for an application to include in its installation scripts.
    Justin

  • How to create a DSN for Oracle Provider for OLE DB in a web server

    Dear Guys,
    I am a Excel VBA developer.
    My requirement is from the Excel I have to call a Stored Procedure with REF CURSOR.
    Normally I am using Microsoft ODBC for Oracle Driver for connecting Oracle DB, which is in the Server .
    We have users using the Excel reports across the globe.
    Sending Excel report is enough, the clients can connect DB from Excel via the DSN created in a web server.
    But, I came to know that we can't access the REF CURSOR using Microsoft ODBC for Oracle Driver and it is possible to access by using ORA OLE DB Provider.
    I have installed Oracle Client in my machine and tried using ORA OLE DB Provider like below
    +con.ConnectionString = "Provider=OraOLEDB.Oracle.1;User ID=user_name;" & _+
    +"Password=pwd;Data Source=Oracle;"+
    The Excel worked fine in my machine but when I run the same Excel in my user machine in a different country I couldn't connect to DB.
    Because the user machine doesn't have Oracle Client installed. We have n number of users across the world and we can't install Oracle client individually.
    So, I have the plan of creating a DSN in a web sever as I used for Microsoft ODBC for Oracle Driver.
    But, my doubt is how can I create a DSN for accessing ORA OLE DB provider? Is there any driver for ORA OLE DB provider? or is there any alternate solution for my issue?
    Can anybody help me on this ASAP?
    Thanks & Regards,
    Satz

    I have created a DSN in a web server (a Public IP machine) that is mapped to a Oracle DB.
    In my Excel using VBA coding, with the help of RDO object I will call the DSN in the Web server using the connection string like "DSN=ORS;UID=SDATA;PWD=SDATA;"
    This is working fine and in this case the client machine doesn't need Oracle client to be installed or any TNS entry.
    The user can run the Excel report by clicking a button and the click event connects the DSN in the web server (through its URL) and routes to the mapped DB and fetches the quried data.
    Please note that the above DSN is created based on Microsoft ODBC for Oracle driver.
    But the issue is using the Microsoft ODBC for Oracle driver I couldnt call the SP with Ref Cursor.
    When I searched in Internet I came to know using the provider oraoledb.oracle we can call SP that uses REF CURSOR.
    Now my question is what is the driver name that I can use to create a DSN to make use of the provider oraoledb.oracle for calling the SP with REF CURSOR from Excel VBA coding ?
    Appreciate your prompt reply.
    Thanks & Regards,
    Sathish

  • DSN less connection from VB 5?

    Hi all,
    while I could get some information on creating DSN less connections into SQL Server with Visual Basic 5 on the Microsoft site, I could not get these tips to work with our Oracle server (what a surprise).
    Maybe somebody here can tell me what I am doing wrong:
    The Service name of our server in TNSNames is acesa1.cp.chbs
    I have a Dataobject on my form in VB5 and set its connect property like:
    Data1.Connect = "ODBC;DRIVER=Oracle73;UID=user;PWD=password;SERVER=acesa1.cp.chbs"
    I set the recordsource property and do a Data1.Refresh.
    I get error ODBC connection to Oracle73acesa1.cp.chbs failed.
    Obviously there is something wrong.
    Thanks to anybody who can point me to the correct syntax!
    Peter

    Solved my problem already. I was copying the code I use for DSN less connections in Visual Foxpro, but made a typo.
    For all who are interested in the solution, here is the code I use to set the connect property:
    Data1.Connect = "ODBC;DRIVER=Oracle73;UID=userid;PWD=password;DBQ=acesa1.cp.chbs;"
    The important part is the DBQ parameter, SERVER or DATABASE are not used by the Oracle ODBC drivers.
    Sorry for bothering you for nothing,
    Peter

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • How to create ringingtone into my iPhone using macbook?

    pls teach me how to create ringingtone into my iphone using macbook...

    Have you installed iOS 5 on your iPhone 3GS?
    If not - then connect it to iTunes, and prepare yourself for a very big download!
    It will give step by step instructions once iOS 5 is installed.
    Cheers,
    Rodney

  • How to Create and Deploy Web Services Using Oracle 9i JDeveloper

    Hi,
    My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
    Hopr to Hear From you,
    Regards,
    G Sreekumar

    You could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
    You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.

  • DSN Less Connections

    Hi,
    The majority of our ASP pages use a DSN Less connection. An example is
    Set dbConnection = Server.CreateObject("ADODB.Connection")
    dbConnection.open "Provider=MSDAORA;Data Source=tnsname;User ID=username;Password=password"
    However I cannot get this to work with the instant client. I can even change the provider to "Oracle in instantclient10_2" and it errors out. DSN Connections like the one below work great
    Set dbConnection = Server.CreateObject("ADODB.Connection")
    dbConnection.open "DSN=dsn_name;UID=username;PWD=password"
    But I do not really want to go around to all of web servers and recode them (nor make the programmers do it). Is there a way to use DSN Less connections with Instant Client? Am I using incorrect syntax, or is it just not possible currently?
    Thanks in advance.
    //Karl

    I finally found an example that worked. The biggest clue to troubleshooting these connection is to reboot the server as IIS reset does not always clean up its cache.
    Anyway the answer was this
    Set dbConnection = Server.CreateObject("ADODB.Connection")
    dbConnection.open "Driver={Oracle in instantclient10_2};Dbq=<db name>;UID=<username>;PWD=<password>;"
    Thanks
    //Karl

  • How to create user dsn for microsoft access driver(*.mdb,.*accdb) in 64 bit

    hi,
    how to create user dsn for microsodt access driver(*.mdb,*.accdb) using command line in 64 bit.
    i have installed 64 bit drivers and when use following command
    C:\Windows\System32>odbccad.exe CONFIGDSN "Microsoft Access Driver (*.mdb,*.accdb)" "DSN=GLDatabase|Description=GL Data Source|DBQ=C:\DataBase\1.mdb"
    CONFIGDSN:'unable to create a datasource for the "Microsoft Access Driver (*.mdb,*.accdb)" component not found in the registry with the error code -2147467259
    but it works with C:\Windows\SysWow64

    yes i have installed Microsoft Access Database engine 2010 redistributale => AccessDatabaseEngine_x64.exe
    i can able to create user dsn using odbccad32.exe in system32 folder but using command line its not working
    C:\Windows\System32>
    odbccad.exe CONFIGDSN "Microsoft Access Driver (*.mdb,*.accdb)" "DSN=GLDatabase|Description=GL Data Source|DBQ=C:\DataBase\1.mdb"
    CONFIGDSN:'unable to create a datasource for the "Microsoft Access Driver (*.mdb,*.accdb)" component not found in the registry with the error code -2147467259

  • Which version of ODBC Driver supports DSN-less Connection in JAVA

    hai,
    Which version of ODBC Driver supports DSN-less Connection in JAVA.
    -raja

    hai,
    Pleae help in this regard.
    I am using a DSN-less connection to conect to
    Access using JDBC. But it is not working. It is throwing
    Data Source Name too long exception.
    I think the problem is with ODBC version.
    Let me clear about this.
    Thanks in Advance.
    -raja

Maybe you are looking for

  • Uploading a file in Webservice

    I have WSDL for a web service which takes a file for Uploading. The file is passed as javax.activation.DataHandler. The WSDl contains following details for it . <xs:element name="uploadFile"> <xs:complexType> <xs:sequence> <xs:element name="dataHandl

  • Letters to be auto generated via Word templates

    Hi Experts, We are trying to auotmate the letter generation through dynamic actions in PA30. e.g. We want to generate the appointment letter in word document after completion of the hiring action. We have customised a new infotype and the sub type un

  • HT1689 When is the release date for iPhone 5?

    When is the iPhone 5 releasing? Is it Really gonna release?

  • Arri raw converter ( alexa )

    I may be able to get some sxs card alexa footage (just junk we shoot real fast when they call lunch break ) from work onto my graid external via friends at work. they are shooting log c for this job but I guess we can make it arri raw instead. questi

  • Reports path - 10g

    Hi All, Can you please let me know how to configure the reports path. Currently I have placed all me .rdf reports in D:\myreports. I am calling one of the reports from FORMS as: Web.show_document('http://<servername>:<port>/reports/rwservlet?userid=s