ODBC database access

Can we access a 'remote' ODBC compliant database through a JSP page being served
by Weblogic? I know that the bridge cannot be used as it is not threadsafe but
has that changed or is there any other way?
Also, can we link in libraries within Weblogic.
Thanks

Hi Sash,
There are definitely some other options.
Did you already test the SequeLink type 3 driver?
The pure java SequeLink JDBC driver uses the proprietary optimised SequeLink
middleware protocol to communicate with a server component.
The SequeLink ODBC Socket server (one of the possible server components)
then uses ODBC API calls to communicate with an ODBC driver.
This JDBC driver is thread safe, so you don't have to worry about that.
A free eval and more info is available at
http://www.merant.com/products/datadirect/jdbc/sequelink/overview.asp.
Cheers,
Dimitri
"Sash" <[email protected]> wrote in message
news:3b6071a5$[email protected]..
>
Can we access a 'remote' ODBC compliant database through a JSP page beingserved
by Weblogic? I know that the bridge cannot be used as it is not threadsafebut
has that changed or is there any other way?
Also, can we link in libraries within Weblogic.
Thanks

Similar Messages

  • Jsp database access using odbc - please help

    Hi friends,
    I�m trying a very simple database access program in jsp data base access using odbc. Odbc has to be used because thin driver or other drivers may not be available in every system of our college and as you know it's not that easy to make changes to those systems. My problem is so simple. I always get an exception in my program.
    My jsp content is as simple as:
    <%@ page import="java.lang.*,java.sql.*,java.io.*,registerbean" %>
    <jsp:useBean id="db" class="registerbean" scope="session"/>
    <%
    String str="insert into reg values('" + db.getName() + "','" + db.getUname() + "','" + db.getPass() + "'," + db.getAge() + ",'" + db.getSex() + "','" + db.getAdd() + "','" + db.getUgcourse() + "','" + db.getUgqual() + "'," + db.getPer() + ",'" + db.getIadd() + "')";
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:yogaesh","scott","tiger");
    Statement stmt=con.createStatement();
    stmt.executeUpdate(str);
    }catch(Exception e1){out.println(str);};
    %>
    the table reg has the structure:
    Name Null? Type
    CNAME VARCHAR2(20)
    UNAME VARCHAR2(20)
    CPSWD VARCHAR2(20)
    CONFPASS VARCHAR2(20)
    CAGE NUMBER
    CSEX VARCHAR2(5)
    CADD VARCHAR2(100)
    COURSE NUMBER
    CQUAL VARCHAR2(10)
    CPER NUMBER
    IADD VARCHAR2(100)
    The registerbean.java file is as below: (This seems to work fine because I tried printing the values using <%= %> tag and it worked out fine and moreover the query string is intact.)
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class registerbean
    private String name,uname,pass,cpass,age,sex,add,ugcourse,ugqual,per,iadd,otherugqual,ccode;
    public void setName(String a)
    name=a;
    public void setUname(String a)
    uname=a;
    public void setPass(String a)
    pass=a;
    public void setCpass(String a)
    cpass=a;
    public void setAge(String a)
    age=a;
    public void setSex(String a)
    sex=a;
    public void setAdd(String a)
    add=a;
    public void setOtherugqual(String a)
    otherugqual=a;
    public void setCcode(String a)
    ccode=a;
    public void setUgcourse(String a)
    ugcourse=a;
    public void setUgqual(String a)
    ugqual=a;
    public void setPer(String a)
    per=a;
    public void setIadd(String a)
    iadd=a;
    public String getName()
    return(name);
    public String getUname()
    return(uname);
    public String getPass()
    return(pass);
    public String getCpass()
    return(cpass);
    public String getAge()
    return(age);
    public String getCcode()
    return(ccode);
    public String getSex()
    return(sex);
    public String getAdd()
    return(add);
    public String getUgcourse()
    return(ugcourse);
    public String getUgqual()
    return(ugqual);
    public String getPer()
    return(per);
    public String getIadd()
    return(iadd);
    public String getOtherugqual()
    return(otherugqual);
    I initially thought the problem was with str but then str seems to be perfect and I get a string of the form �insert into reg values('c','c','c',98,'Male','c','B.Tech, Applied Artificial Neural Networks','HSC',9898,'h')� which I verified through a javascript debugger. The session scope used is to get values through the db bean from another jsp file. The problem is in the executeUpdate() line of this code. I even tried changing the updation table, but in vain. What could be done to rectify this? Please help me out and please do remember that I have no option but to use odbc.
    Thanks in advance.
    R. Yogaesh.

    I didn't verify the type of exception and i'm now going to do that, but then when the string is as perfect as needed, what is the need for a prepared statement? What is the basic difference between the two? And basically what is the problem with this piece of code which creates an exception? Please reply as soon as possible.
    Thankyou very much.
    R. Yogaesh.

  • Database Access via ODBC

    Hi,
    Since recent (LMS3.2) Cisco released the Open Database Schema support. In the guidelines I find info/procedures to access the database remotely via ODBC. However only Solaris/Solaris Windows/Windows is described. Is there any info how I can access the Database (LMS installed on Sol10) remotely via a Windows system ?
    Jan

    The instructions for Windows/Windows apply, but you'll need to first get the necessary DLLs to allow for database access. The easiest way to do this would be to install Common Services from the LMS 3.2 DVD on a Windows 2003 or 2008 machine. Then extract the DLLs, and uninstall Common Services.
    It may also be possible to start the installer, have it extract the install bits to the TEMP location, then you can pull the DLLS from there. However, I have not tried this for obtaining database DLLs (only device packages).

  • Access ODBC Database source

    I have setup the ODBC Database source ,but when I run the form builder of the developer6i under windows2000,connect with
    ('username/password@odbc:database source name') ,It don't successed
    I think it maybe is developer6i's problem itself.
    plese help me
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Javier Sirvent:
    There are a patch for Forms6i (NT) that includes OCA 6.0.0.35 at oracle page.
    http://otn.oracle.com/software/products/forms/software_index.htm <HR></BLOCKQUOTE>
    I am ok thank you very much!
    null

  • [Microsoft][ODBC Microsoft Access Driver] Syntax error

    I am new to Java. I have tried to write a simple program insert table in Access2002. However, I got the following error,
    ERROR: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement
    My code is as follows,
    import java.lang.*;
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    public class dateconv3 {
    public static void main (String[] args) {
    //Setting up the JDBC-ODBC bridge connection
    String DRIVER_NAME = "sun.jdbc.odbc.JdbcOdbcDriver";
    String CONNECTION_URL = "jdbc:odbc:book1";
    // The JDBC Connection Object
    Connection con = null;
    // The JDBC PreparedStatement object
    PreparedStatement ps = null;
    boolean rc = false;
    try { // try under for loop
    // Get an connection
    Class.forName(DRIVER_NAME).newInstance();
    con = DriverManager.getConnection(CONNECTION_URL);
    SimpleDateFormat formatter = new SimpleDateFormat ("yyyy/mm/dd");
    java.util.Date currentTime_1 = new java.util.Date();
    String dateString = formatter.format(currentTime_1);
    ParsePosition pos = new ParsePosition(0);
    java.util.Date currentTime_2 = formatter.parse(dateString, pos);
    java.sql.Date dCurDate=new java.sql.Date(currentTime_2.getTime());
    System.out.println(dCurDate);
    String userid = "1";
    String booktitle = "Java Servlet Programming";
    int amount = 202;
    String sqltxt="INSERT INTO TRANSLOG ( userid, booktitle, date, amount ) VALUES (?,?,?,?)";
    // Create a statement object that we can execute queries with
    ps = con.prepareStatement(sqltxt);
    ps.setString(1, userid);
    ps.setString(2, booktitle);
    System.out.println(currentTime_2);
    java.sql.Date sqlDate = new java.sql.Date(currentTime_2.getTime());
    System.out.println(sqlDate);
    ps.setDate(3, sqlDate);
    ps.setInt(4, amount);
    System.out.println("INSERT into translog table");
    // Execute the statement
    ps.execute();
    rc = true;
    } catch (Exception ex) {
    // Sent the error
    System.out.println("ex.getMessage() print: " + ex.getMessage());
    } finally {
    try {
    if (ps != null) {
    ps.close();
    if (con != null) {
    // Put the connection back into the pool
    con.close();
    } catch (Exception ex) {
    // Ignore any error here
    The Access has been set to the date format yyyy/mm/dd and I got the following result.
    java dateconv3
    2001-01-04
    Thu Jan 04 00:56:00 CST 2001
    2001-01-04
    INSERT into translog table
    ex.getMessage() print: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement
    Please advise. I got frustrated with such a silly question. Anybody can help me to resolve it.
    Patrick

    INSERT INTO TRANSLOG ( userid, booktitle, date, amount ) VALUES (?,?,?,?)I don't have Access on my computer at home here, but it is quite possible that "date" is a reserved word in Access's version of SQL. If you can change the column name, I'd recommend you do that. Otherwise try changing your SQL code to this:
    INSERT INTO TRANSLOG ( userid, booktitle, [date], amount ) VALUES (?,?,?,?)
    But be warned that this [trick] doesn't work with other databases.

  • [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

    Hi,
    I am getting following error message ,
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
    When run this code.
    <%@ page import= "java.sql.*"%>
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    Statement st = con.createStatement();
    st.executeUpdate("update tscipshift set 11-Aug-08='M' where TechN='Elamparuthi'");
    %>
    tscipshift=table ,column=11-Aug-08 are all exist.
    I dont know why I am getting error mesage.
    Any idea why?

    Shahbaz2008 wrote:
    you haven't set your user name and password hereI don't believe that's necessary with Access. Then again, it's not an enterprise database.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    change it to this
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","+username+","+password+");
    here pass your username and password...
    In Oracle default user name and password is
    username = scott
    password = tigerSo who uses that? Only an eejit would leave that account open.
    So the statement would be
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","scott","tiger");
    or In Mirosoft Access there is no user name and password so the statement will be Like I said - unnecessary, and not the reason the OP is having problems.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","","");>
    Besides this change your table name 11-Aug-08 to anything that is not start with number or any special symbols.
    for example aug112008 is good or aug is too good.No, it's still not good if you understand ANYTHING about relational databases and normalization.
    I think it would work.I think you're just as stup!d as the OP.
    %

  • How to handle and manage a multi Database access in runtime with LCDS?

    Hello there
    I got several customer working with the same application and I wonder how,  with LCDS,  to manage  in a runtime a multi dataBase access; without creating a configuration "mxl" file in
    the folder catalina for each database.
    Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a  folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
    Thus, my question is :
    Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod   environment (or database) where the same application can access to.
    Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
    Regards

    Hello Ulrich,
    with compact and repair I mean the MSAccess function "Compact and Repair".
    Please follow the link below for more details:
    http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
    Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
     I want to execute this function via cvi code and not by hand ;-).
    Thank you for your support.
    Frank

  • Re: How to setup database access in Forte Standalone?

    Hi Chang Chiang Seng,
    I've installed Forte Standalone on Windows 3.1 and would like to set
    it up to access an ODBC database.
    Is there anyway to do it, since I am not connected to any central node ?The following is a reply posted to this list earlier from Bobby Carp
    at Forte, which addresses your question:
    2. If you have Win 3.1 or Win 95, then you cannot run an environment
    manager or server partitions, but you can still connect to an ODBC
    database.
    Setting up an ODBC resource manager is very straight-forward. You do
    some
    of the work in the ODBC control panel (ie. mapping a name to a
    particular
    data source such as Access file, flat file, etc.). You then run Forte
    Standalone which will automatically use ODBC for any DBSessions or
    DBResourceMgr
    service objects that need to get created by a run. You don't need to
    change your service object to point to an ODBC Resource Mgr, the system
    does it automagically.
    Hope it helps,
    Kerry
    | | / \ Kerry Bellerose [email protected]
    | || C | Senior Consultant http://www.lindhard.com/
    | | \___/ Lindhard International
    | |_____ Datavej 52 direct: 45 45 94 01 03
    | | 3460 Birkeroed desk: 45 45 82 21 21
    |_________| Denmark fax: 45 45 82 21 22

    Hi Wilson,
    As a prerequisite , that VM need to access the gateway .
    It means that you need to
    create an external virtual switch then connect that VM to external virtual switch then allocate a LAN IP for VM .
    http://technet.microsoft.com/en-us/library/jj647786.aspx
    After this you may think of this VM as a physical machine in your LAN then do what you need .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to setup database access in Forte Standalone ?

    Hi,
    I've installed Forte Standalone on Windows 3.1 and would like to set it up to access an
    ODBC database.
    Is there anyway to do it, since I am not connected to any central node ?
    I tried to follow the instruction on the book but was not able to set up a DB Resource because
    the EConsole cannot be executed.
    Thanx.
    Chiang Seng, Chang
    <[email protected]>

    Hi Wilson,
    As a prerequisite , that VM need to access the gateway .
    It means that you need to
    create an external virtual switch then connect that VM to external virtual switch then allocate a LAN IP for VM .
    http://technet.microsoft.com/en-us/library/jj647786.aspx
    After this you may think of this VM as a physical machine in your LAN then do what you need .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to handle and Manage Multi DataBase access with LCDS in runtime ?

    Hello there
    I got several customer working with the same application and I wonder how,  with LCDS,  to manage  in a runtime a multi dataBase access; without creating a configuration "mxl" file in
    the folder catalina for each database.
    Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a  folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
    Thus, my question is :
    Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod   environment (or database) where the same application can access to.
    Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
    Regards

    Hello Ulrich,
    with compact and repair I mean the MSAccess function "Compact and Repair".
    Please follow the link below for more details:
    http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
    Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
     I want to execute this function via cvi code and not by hand ;-).
    Thank you for your support.
    Frank

  • "java ODBC Microsoft Access Driver Syntax error (missing operator) in query

    Hi I am new to java and I am getting this error message when using java to access and insert data into an MS Access database.
    "java ODBC Microsoft Access Driver Syntax error (missing operator) in query expression"
    The commands are
    String insertCommand = "INSERT into MetricOutput(A1,A,DRR,DeRR,RE,WDRR,WDeRR,WRE,ARF,SRF,HRF,WARF,WSRF,WHRF,SDC,WSDC,MAR,WMAR,H1,H11,H2,H21,cluster) "+
                             "VALUES("+comMappedCount+","+stdCount+","+DRR+","+DeRR+","+RE+","+WDRR+","+WDeRR+","+WRE+","+ARF+","+SRF+","+HRF+","+WARF+","+WSRF+","+WHRF+","+SDC+","+WSDC+","+MAR+","+WMAR+","+H1+","+H11+","+H2+","+H21+",+array)";

    "VALUES("+comMappedCount+","+stdCount+","+DRR+","+DeRR+","+RE+","+WDRR+","+WDeRR+","+WRE+","+ARF+","+SRF+","+HRF+","+WARF+","+WSRF+","+WHRF+","+SDC+","+WSDC+","+MAR+","+WMAR+","+H1+","+H11+","+H2+","+H21+",+array)";After looking at your post in the editor, I see what your real query looks like.  You realize that ",+array[i])" is part of the query, right?  And not actually looking at your Java array?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • "[Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition

    I am creating a program in Java which has a Database reference application.The Database I am using is MS Access.But whenever I am trying to run the program from DOS Prompt(ie executing the program:java <program name>) I am unable to connenct to the database.The compiling of the program doesn't show any error(ie javac <program name>) The following error is displayed at the DOS Prompt:
    "[Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition."
    Pls give me a detailed help report.If it is a Machine side problem do help me to solve it.Mine is a Compaq Presario Machine,OS:Windows 98,Database:MS Access(Office XP)
    I request you to help me in this matter.Pls email ur responses to:
    [email protected]
    [email protected]

    hi there
    did u configure ur ODBC setting if no then try these steps
    ================== ODBC Settings ========================
    step 1 : go to control panel
    step 2 : ODBC Data Sources
    step 3 : click UserDSN Tab
    step 4 : click ADD Button , Select Microsoft Access Driver , Finish
    step 5 : Give Datasource Name as "DATABASE_NAMEXXX" , no double quotes
    step 6 : use Select and select Database_NAME.mdb from <INSTALL DIRECTORY>\DATABASE_NAME.mdb
    click ok , ok finish
    <INSTALL DIRECTORY> is where yr database is
    =========================================================
    then in yr program
    URL for yr database
    "jdbc:odbc:DATABASE_NAMEXXX" // as name in step 5
    and Driver is
    "sun.jdbc.odbc.JdbcOdbcDriver"
    if u done all these steps then check yr spelling of table and tabel field in yr program
    hope this works for u
    regards
    Satinderjit

  • [ODBC Microsoft Access Driver] Syntax error (missing operator)

    Aello' - as you can see in my database table their are two
    records to delete based on the HISTORY_ID of 1. This was working
    just fine when I was using a MS SQL Server database but when I
    switched to the MS Access database I get this error now.
    Is their a syntax difference?

    mikeap wrote:
    > Attached code. Clearly their are records to delete, what
    am I missing?
    >
    > Using MS Access database.
    >
    > [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft
    > Access Driver] Syntax error (missing operator) in query
    expression
    > 'R_PROJECT_MEDIA WHERE Media_ID IN (1)'.
    >
    > <cfquery datasource="tbar">
    > DELETE R_HISTORY_MEDIA
    > WHERE History_ID IN (#FORM.pHistory#)
    > </cfquery>
    DELETE
    FROM R_HISTORY_MEDIA
    WHERE History_ID IN (#FORM.pHistory#)
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

  • SBO Ent XI 3.1 SP3 repository database access error

    Dear Experts,
    We are installing XI SP3 and using oracle 10g for repository database, we've installed 10.2.0.4 oracle db on windows 2008,
    tnsping is working, but we are getting following error ;
    Database access error. Reason Loading shared object failed. First tried to load library oci and failed because of error: [%1 is not a valid Win32 application.
    ]. Second tried to load library oci.dll and failed because of error: [%1 is not a valid Win32 application.
    Problems installing Xi 3.1 sp3 with Oracle DB
    Same problem solve via using 32bit oracle client, how can i instalee 32 bit oracle client, because oracle path's using ths insttalion directory on same server,
    Could you please wirte the steps for how to install oracle client for boe on the same server via 64 bit oracle home
    Best Regards

    BusinessObjects is not a 64-bit application.  It is a 32-bit application that can be run on a 64-bit server.  My experience has been that because it is a 32-bit application, it will not work with 64-bit database drivers.  For example, we have to set up 32-bit ODBC connections in order to connect to MS SQL Server even though the server where BOE is installed is a 64-bit server.
    -Dell

  • ODBC Microsoft Access Driver Error

    Help! I'm a novice. I have PSE3.0 installed on my laptop (HP Pavillion) which has the Windows XP operating system. It has been working ok for a couple of years and is now causing problems. I was able to import scaned items and photos from files on my hard drive. A couple of days ago, when I tried to do that, I received the following message "[Microsoft [ODBC Microsoft Access Driver] cannot open database]. It may not be a datbase that your application recognizes or the file may be corrupt." I was also not able to import photos directly from my camera chip. Is this an Adobe problem or a MS problem? Any suggestions as to how to fix? Thanks. Hank

    Hello Barb,
    Thanks for your suggestion. Unfortunately that didn't work. When I clicked on "recover" it appeared to go to 66% and then the computer froze up. I had to do a "hard" shutdown.
    I've done a defrag which the system told me was not necessary. That didn't help. I have approx 50% of free space on my hard drive. So I don't think space is an issue.
    For the past few months both the HP photo package and Adobe have been opening when I download photos from my camera. Is it possible that the two programs are somehow interferring with each other. On my last download, the photos wouldn't download to PSE3 and i received the ODBC error message. The photos did download to the HP program.
    I also tried to reinstall the PSE3 program but I received a message that said I currently have a more recent version of Adobe (I suspect that is a reference to the Adobe Reader program) and terminated the installation.
    I'm open to any suggestions. Thanks Hank

Maybe you are looking for

  • Migration from ODI 10.1.3.5 to ODI 11.1.1.7 RCC issue

    SRC_SET is used, but possibly not needed, as both the source and target Datastores are on the same Data Server I am getting this issue when i ran RCC can i know why this error occurred and what is solution to remove this error. Thanks

  • Problems with cache.clear()

    Hello! We are having some problems with cache clears in our production cluster that we do once a day. Sometimes heaps "explode" with a lot of outgoing messages when we do a cache.clear() and the entire cluster starts failing. We had some success with

  • Time Machine failing...

    I did an erase install on a Dual G4 1.25Ghz with 2GB-RAM. I have a second internal drive that I have configured for time machine. But I keep getting an error that TM cannot copy files to the drive. This is after about 10GB have been copied and there

  • What is the best way to sharpen?

    l am unsure how to best sharpen in photoshop touch. Any recommendations?

  • Unable to connect to YouTube

    Each time I try to run YouTube, I get the following message, "You must first connect to iTunes with an Internet connection to enable YouTube". I have connected to iTunes and purchased a song. My firmware is up to date 1.1.2. Please help. Thanks