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

Similar Messages

  • 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/

  • 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&#56112;&#56333;
    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.

  • Connecting to the Oracle 10g Database through Java code

    I have a Oracle 10g database to be connected to.
    Through sql plus, I can connect to it using the following command
    sqlplus "sys@pmi as sysdba"and password is 'password'
    how do I connect to this db through my Java code?
    I tried
    _connection = DriverManager.getConnection("jdbc:oracle:thin:@10.245.4.100:1521:pmi as sysdba", "sys", "password");but it gave the exception "ExceptionIo exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169869568)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))"
    I also tried
    _connection = DriverManager.getConnection("jdbc:oracle:thin:@10.245.4.100:1521:pmi", "sys", "password");but this gives the exception "ExceptionORA-28009: connection as SYS should be as SYSDBA or SYSOPER"
    Can anyone please help me in writing the line of code

    You need to use the getConnection syntax that requires a Properties object.
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#05_05
    - cafal

  • How to create a DSN (Data Source Name) for "Oracle 10g XE" on SUSE 10??

    Hii Friends,
    I am new Linux user.I installed SUSE Linux 10.2. I am planning to do my project on Linux with J2EE,Oracle technologies. I installed Oracle 10g Express Edition. But unfortunately i have no provider name for oracle in the Providers List in SUSE/Gnome Desktop/System/Data Access points/ dsn list. I am unable to understand what actually happened. Should i install any other libraries, or Odbc drivers (I mean aren't they not given by Oracle XE Setup, as in MS Windows XP) ? Any one please help me. I need this immediately.
    Waiting for a reply,
    Mahidhar Chaluvadi
    CS Engg. Student
    Vizag.

    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 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

  • 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

  • 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

  • What is Connection in Oracle 10g Database?

    Please let me know what is connection term in Oracle 10g Database in detail?
    Thanks,
    Waheed.

    Network Connections
    Oracle Net Services is Oracle’s mechanism for interfacing with the communication
    protocols used by the networks that facilitate distributed processing and distributed
    databases.
    Connections and Sessions
    Connection and session are closely related to user process but are very different in
    meaning.
    A connection is a communication pathway between a user process and an Oracle
    instance. A communication pathway is established using available interprocess
    communication mechanisms (on a computer that runs both the user process and
    Oracle) or network software (when different computers run the database
    application and Oracle, and communicate through a network).
    Oracle® Database
    Concepts
    10g Release 1 (10.1)
    Part No. B10743-01

  • 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

  • Establishing DSN less connection to .csv file

    Hello to all,
    I need to establish dsn less connection to .csv file, can anybody suggest me the solution.
    Please treat this matter as urgency,
    Thanks in advance.
    Y_mail

    Hi Mohammad,
    it would be easier for us all if you would continue one of your previous topics about the same problem:
    http://forum.java.sun.com/thread.jsp?forum=48&thread=194701
    http://forum.java.sun.com/thread.jsp?forum=48&thread=193727
    http://forum.java.sun.com/thread.jsp?forum=48&thread=194147
    http://forum.java.sun.com/thread.jsp?forum=48&thread=190876
    Also changing your userprofile doesn't help much.
    If you watch the replies to your topics, you see that in this one
    http://forum.java.sun.com/thread.jsp?forum=48&thread=193727
    we're about to work out a solution for reading a csv file with BufferedReader. The JDBC connection mentioned there is only for putting the retrieved values into Access afterwards; for your task this part can be ignored.
    So I think you should find your solution there.
    If not, please ask again - but please (!) don't start a new topic or user again for that same problem.

  • DSN-less Connection in a Servlet

    hai,
    I am using the following DSN-less Connection in a servlet. It is working fine in as
    a stand alone application. But it is not working in a a servlet.It is throwing DSN name too
    long exception.
    dsn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=d:\\db1.mdb";
              try
              System.out.println("DSN-less connection.......................");
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:"+dsn);
              if(con!=null)
                   System.out.println("Connected");
              else
                   System.out.println("Not Connected");
              st=con.createStatement();
              System.out.println("connected.........................");
              catch(Exception e)
              {   e.printStackTrace();
    Please give me the details why it is not working.
    I am using jdk1.3 and jsdk2.0.
    bye
    -raja

    Dear jschell,
    I am very thankful to u for being my problem solved.
    As u said the problem is with the syntax and with environment.
    I have changed the syntax in connection string by inserting a
    space in between
    DRIVER={Microsoft Access Driver and (*.mdb)};DBQ=c:\\db1.mdb";
    and running the servlet in servletrunner it is working.
    Now to run the same servlet using a webserver I need to configure it properly.
    I am usning Java Web Server. Earlier I installed JDK1.2 on my system and
    now I changed it to JDK1.3. There r some problems while uninstalling JDK1.2.
    May be the JWS is using the jdk1.2 runtime environment.
    Pleaselet me clear this.
    Thanks a lot for all the help u have done so far.....
    -raja

  • 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

  • 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

  • DSN to DSN-Less Connection

    Hi Guys,
    Some advice please, perhaps some suggestions on the best way
    forward please.
    I have inherited a Web site runnning on MS Access db's
    utilising DSN connections.
    I do not use DSN connections rather DSN-less connection
    strings.
    My question is, is there an easy way / operation, to convert
    all the connection strings to a DNS-less vesion. My host does not
    allow DSN connections where they set the alias on the server, hence
    my requirement.
    Any suggestions please. I could really do with an easy answer
    as I do not really wish to have to re-script the site.
    Thanks as always.
    Jules

    Sorry meant to post the recordset script too. Here is is
    <%@LANGUAGE="JAVASCRIPT"%>
    <!--#include file="Connections/bealdevelopments.asp"
    -->
    <%
    var cityliving = Server.CreateObject("ADODB.Recordset");
    cityliving.ActiveConnection = MM_bealdevelopments_STRING;
    cityliving.Source = "SELECT * FROM developments WHERE
    lifestylesection LIKE '%1%' AND live = '2'";
    cityliving.CursorType = 0;
    cityliving.CursorLocation = 3;
    cityliving.LockType = 1;
    cityliving.Open();
    var cityliving_numRows = 0;
    %>
    <%
    var countryliving = Server.CreateObject("ADODB.Recordset");
    countryliving.ActiveConnection = MM_bealdevelopments_STRING;
    countryliving.Source = "SELECT * FROM developments WHERE
    lifestylesection LIKE '%2%' AND live = '2'";
    countryliving.CursorType = 0;
    countryliving.CursorLocation = 2;
    countryliving.LockType = 1;
    countryliving.Open();
    var countryliving_numRows = 0;
    %>
    <%
    var familyliving = Server.CreateObject("ADODB.Recordset");
    familyliving.ActiveConnection = MM_bealdevelopments_STRING;
    familyliving.Source = "SELECT * FROM developments WHERE
    lifestylesection LIKE '%3%' AND live = '2'";
    familyliving.CursorType = 0;
    familyliving.CursorLocation = 2;
    familyliving.LockType = 1;
    familyliving.Open();
    var familyliving_numRows = 0;
    %>
    <%
    var watersideliving = Server.CreateObject("ADODB.Recordset");
    watersideliving.ActiveConnection =
    MM_bealdevelopments_STRING;
    watersideliving.Source = "SELECT * FROM developments WHERE
    lifestylesection LIKE '%4%' AND live = '2'";
    watersideliving.CursorType = 0;
    watersideliving.CursorLocation = 2;
    watersideliving.LockType = 1;
    watersideliving.Open();
    var watersideliving_numRows = 0;
    %>
    <%
    var Repeat1__numRows = -1;
    var Repeat1__index = 0;
    cityliving_numRows += Repeat1__numRows;
    %>
    <%
    var Repeat2__numRows = -1;
    var Repeat2__index = 0;
    countryliving_numRows += Repeat2__numRows;
    %>
    <%
    var Repeat3__numRows = -1;
    var Repeat3__index = 0;
    familyliving_numRows += Repeat3__numRows;
    %>
    <%
    var Repeat4__numRows = -1;
    var Repeat4__index = 0;
    watersideliving_numRows += Repeat4__numRows;
    %>

Maybe you are looking for