PreparedStatement for SQL using IN (SQL Server 2000)

Hi, guys
How can I create a preparedStatement for a query using IN operator, which allow me to insert any number of parameters?
eg: SELECT * FROM Students WHERE lastname IN (?, ?, ?, ....)
Thanks
jacklty

Hi, I have found a simpler way of doing this.
private static final String QUERYSTRING = "SELECT * from junk_table "+
                                        " WHERE status in (:x) " ;
<..somewhere later in the code...>
StringBuffer tempBuffer=new StringBuffer(QUERYSTRING);
//Find :1 and replace with a comma separeted list of stauts
tempBuffer.replace(tempBuffer.indexOf(":x"),tempBuffer.indexOf(":x") + ":x".length(),
new String(System.getProperty("status")));
In short, here I am creating my own bind parameters named as :x,:y (lack of imagination on my part...) and then replacing the values of those values with the comma-separated value before actually creating the PreparedStatement.
Hope this works
--Ved                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Converting SQL statements from MS server 2000 to Oracle 10g

    We are moving over from MS server 2000 to Oracle 10g as our database for Peoplesoft system.
    There are several embedded SQL statements that I need to investigate to see what needs converting.
    So far I can see a need to convert the following:
    Dates.     GetDate() to ?
    Outer joins. *= to LEFT OUTER JOIN
    Has anyone else done a similar exercise and what other functions do I need to convert?
    Thanks.

    Hello
    A quick google search (http://www.google.co.uk/search?hl=en&q=ms+sql+server+oracle+differences&spell=1)
    came up with this:
    http://dba-oracle.com/oracle_news/2005_12_16_sql_syntax_differences.htm
    There's a quite a few more sites listed.
    HTH
    David

  • Delcare Cursor using Dynamic SQL using PL/SQL in Oracle 7.3.4

    In Oracle 7.3.4, can I declare a cursor at run time using Dynamic SQL. From the sample code in this website, it seems that Oracle 8 support this function. Please help. Thanks a lot.
    If I can do this on Oracle 7.3.4, could you give me some sample codes? Thanks.
    Regards,
    Raymond

    Hi,
    Try using the the following code where you can dynamically build the Valid Select stmt. and call that where ever you want.
    declare
    Type Cur_ref Is Ref Cursor;
    C_ref Cur_ref;
    V_Str Varchar2(100);
    V_Name Varchar2(100);
    Begin
    V_Str := 'Select Ename from Scott.emp Where empno = 7369';
    Open C_Ref for V_Str;
    Fetch C_ref Into V_Name;
    close C_Ref;
    dbms_output.put_line(V_Name);
    End;
    regards
    gaurav
    null

  • Improve performance SQL using better SQL functions

    Good afternoon,
    I am trying to improve the performance of a SQL query, embedded within a Pro*C environment.
    The query is the following:
    SELECT ri FROM
    TRANSLAT WHERE (:ora9_ogt_prfx LIKE (TRANSLAT.OGT_PRFX||'%')) AND
    (:ora9_in_prfx LIKE (TRANSLAT.IN_PRFX||'%')) AND
    (LENGTH(:ora9_in_prfx) = ASCII(TRANSLAT.IN_LGTH))
    ORDER BY LENGTH(TRANSLAT.OGT_PRFX) DESC,
    LENGTH(TRANSLAT.IN_PRFX) DESC
    The table format is the following:
    SQL> desc translat;
    Name Type
    IN_LGTH CHAR(1)
    IN_PRFX VARCHAR2(24)
    NAME VARCHAR2(20)
    OGT_PRFX VARCHAR2(24)
    OUT_PRFX VARCHAR2(24)
    RI NUMBER(18)
    SNPUPDT NUMBER
    The idea of the query is the following:
    Give the information about a tupple with following conditions:
    - The field "OGT_PREFIX" starts with ora9_ogt_prfx
    - The field "IN_PREFIX" starts with ora9_in_prfx
    - Some length variable should be ok
    and order them, first following the OGT_PRFX field, and second following the IN_PRFX field.
    Following a tkprof analysis, this query is parsed again everytime it is needed,
    despite the usage of bind variables (all variables start with a ':' character).
    Questions:
    - Why is the query parsed again every time?
    - Personally I think this is due to the '||' operator. Is there another way of saying that a variable should start with the value of a field in such a way that the '||' operator is not needed (does there exist a logical operator like "Begins_with" so that the conditions becomes "TRANSLAT.IN_PRFX Begins_with :ora9_in_prfx")?
    - Within the query, there is always a reference towards the table itself while referencing a field. Would it make any performance difference if "TRANSLAT.OGT_PRFX" is replaced by "OGT_PRFX", "TRANSLAT.IN_PRFX" by "IN_PRFX", ...?
    Thanks a lot
    Dominique
    P.s. if this thread is entered in the wrong discussion forum, please let me know.

    - Why is the query parsed again every time?Because somewhere in the code the cursor gets closed, so on a subsequent usage you have to open it again and parse again.
    - Personally I think this is due to the '||'
    operator. Is there another way of saying that a
    variable should start with the value of a field in
    such a way that the '||' operator is not needed (does
    there exist a logical operator like "Begins_with" so
    that the conditions becomes "TRANSLAT.IN_PRFX
    Begins_with :ora9_in_prfx")?I think that you don't know a reason for the seen behaviour and you are guessing here.
    Please post the tkprof output here so we can examine what is the root cause for your performance problem. And by the way, what is the response time and what is acceptable?
    - Within the query, there is always a reference
    towards the table itself while referencing a field.
    Would it make any performance difference if
    "TRANSLAT.OGT_PRFX" is replaced by "OGT_PRFX",
    "TRANSLAT.IN_PRFX" by "IN_PRFX", ...?No, in fact the use of aliases or even table names is considered a good practice, especially when more tables are involved, and in this case of only one table it doesn't really matter.
    Regards,
    Rob.

  • Storage issues for Proxies using Final Cut Server

    Hi there,
    we have a fairly high amount of material that is just being put into Final Cut Server to be archived again.
    I dont mind the Xserve being busy to create these proxy files, but they tie up too much space!
    (Maths: 500 GB / 40 h of DVCAM footage result in more than 100 GB proxy files).
    We have those 40 h running though more than once a month plus a whole LOT of material from the last 2 years - and our Xsan is only 7 TB in size.
    Although we could theoretically buy another fiber raid this solution is not really future proof - it just pushes the time when we have to buy the next one a couple of months forward.. on top of that I cannot afford to have expensive, fast fiber channel storage used for proxies of files that are long archived and have only very limited use (and IF we need them, stick in the archive device and done).
    Any ideas how to get rid of proxy files from archived assets?
    I dont really want to take pen and paper and delete the proxies of the files by hand from the bundle.. dont think FCSvr will like this either.
    thanks for any advice
    tobi

    So I'm not sure how your math is adding 100GB of proxy files
    Are you creating VersionS and/or Edit Proxies of everything?
    I ask because using the default Clip Proxy setting gives you file sizes similar to the ones below. These numbers aren't accurate because the default Transcode setting uses Variable Bit Rate (VBR) encoding for both video and audio, but assuming you had a relative constant 800kbps stream here's how large your Proxies.bundle file should be
    800kbps * 30secs = 2.4mb
    800kbps * 60secs = 4.8mb
    800kbps * 60secs * 60min = 280.8mb per hour
    280.8mb per hours * 40= 11.2GB
    Also note, that deleting an asset from FCSvr doesn't delete the proxy files so you could have a lot of proxies left over from a few historical scans.

  • SF & MS SQL Integratio​n using MS SQL BCP connector

    Hi
    I am trying to integrate SF with MS SQL using MS SQL BCP connector provided in Boomi, but getting the following error:
    Unable to store data, error copying stream.; Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output; Caused by: Invalid null character in text to output
    I think this is an issue iwth the encoding formats of MS SQL, Atom and the connector profile. The atom's & connector profile's encoding has been changed to UTF-8 and still face the same issue.
    Has anyone faced this before? Am i missing something?

    Hi
    I am trying to integrate SF with MS SQL using MS SQL BCP connector provided in Boomi, but getting the following error:
    Unable to store data, error copying stream.; Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output; Caused by: Invalid null character in text to output
    I think this is an issue iwth the encoding formats of MS SQL, Atom and the connector profile. The atom's & connector profile's encoding has been changed to UTF-8 and still face the same issue.
    Has anyone faced this before? Am i missing something?

  • Problem Using JSQL level 4 driver for SQL Server 2000

    I am having problem , connecting to my Sql Server 2000 ( deployed on Windows 2000 Professional) using Microsoft JSQL level 4 Deriver .
    I am doing it with following code,
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         Connection conn = DriverManager.getConnection
    ("jdbc:microsoft:sqlserver://192.168.0.232:1433;databaseName=DBNew;user=nakhter;Password=java;");
    It gives me following Exception ,
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'nakhter'. Reason: Not associated with a trusted SQL Server connection.
         at com.microsoft.jdbc.base.BaseExceptions.createException Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
         at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
         at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
         at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
         at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
         at java.sql.DriverManager.getConnection(DriverManager.java:517)
         at java.sql.DriverManager.getConnection(DriverManager.java:177)
    I am usign my windows authentication usrname and password .
    I has tried it with user "sa" but still same exception .
    Could someone help me in this regard ?

    You need to switch SQL server to just use SQL Server authentication or both. The problem is that it is looking for a Windows NT account for nakhter with the password java. We get this all the time on new SQL Server installs if you just take the defaults.

  • Problem using type 4 driver for SQL Server 2000

    Hi..
    I'm getting the following error message when i attempt to connect to SQL Server 2000:
    "Cannot open user default database. Using master database instead"
    I am passing the proper connection url and the user name and the password.However,my application does not connect to the SQL Server.I have tried using JTurbo and Weblogic drivers.
    All tables in this database have been imported using DTS and hence have "dbo" as their owner.I do not have administrator privileges on the db server.
    Is there a workaround to this problem by changing some settings for ownership of the db objects?
    I have already tried using :
    EXEC sp_changedbowner <username>
    for databases where I am not a user and it still doesn't work for these as well.
    Thanks,
    Jay.

    It might be in your DSN. Give that a check, it could be that the DSN has a default db selected and also a userID/Pwd that's incorrect for that db. Just thinking out loud.
    B

  • Error Using the SQL Server 2000 Driver for JDBC Service Pack 3

    Hi,
    I�m using the SQL Server 2000 Driver for JDBC Service Pack 3. The connection is succesfully, but when I use de statement.executequery() method, there is the follow exception:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'PEC_COUNTRY'.
    This is my code:
    ResultSet resultSet;
    Statement statement;
    Connection connection;
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://S0MALMUERTA:1433;user=sa;password=");
    statement = connection.createStatement();
    resultSet = statement.executeQuery("SELECT COY_INX, COY_NAME, COY_ICO FROM PEC_COUNTRY
    ");When I make the last instruction, occurs the above exception
    Thanks in advance
    Luija

    The way you are connecting, the default database used will be 'master' and i guess that the table PEC_COUNTRY was defined in another database.
    If it is the case you need to specify the database name.
    connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://S0MALMUERTA:1433;DatabaseName=yourdb;user=sa;password=");

  • Using MS SQL Server 2000 for WLCS 3.50 DB

    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

    Hi Michael,
    At this time SQL Server 2000 is not certified for WLCS 3.5. Since the
    schema has changed between 3.2 and 3.5, running the 3.2 scripts is not a
    good idea.
    I can tell you that certification is in progress for SQL Server 2000. Your
    best bet is to contact your Sales Representative to get an idea of when
    certification might be coming.
    I hope this helps.
    - Ginny
    "Michael Schulz" <[email protected]> wrote in message
    news:[email protected]..
    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

  • Has anybody used the microsoft JDBC 2.0 driver for sql server 2000?

    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load the
    driver.I try viewing the class file from the jar file using the jar utility it
    gives an unknown Zip format error.Anybody has any solution for this ?If anybody
    has managed to work with this microsoft driver i will be grateful if they provide
    me with a solution.
    Thanks
    Thomas

    Hello Thomas,
    You may want to download the driver again and install it again.
    heres a sample xml tag in the config.xml:
    <JDBCConnectionPool
    DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    InitialCapacity="3" MaxCapacity="12" Name="MSpool"
    Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
    Targets="myserver"
    URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
    ensure that you follow the instructions from Microsoft. For using 2000
    driver you will need to have
    Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
    Install_dir/lib/mssqlserver.jar in the CLASSPATH.
    hth
    sree
    "Thomas" <[email protected]> wrote in message
    news:3c91ec0e$[email protected]..
    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
    the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
    the
    driver.I try viewing the class file from the jar file using the jar utility
    it
    gives an unknown Zip format error.Anybody has any solution for this ?If
    anybody
    has managed to work with this microsoft driver i will be grateful if they
    provide
    me with a solution.
    Thanks
    Thomas

  • Using JSP & JDBC driver for SQL Server 2000 on Red Hat

    I successfully have a .jsp app running on windows server 2000 using JDBC
    driver for SQL Server 2000. Which I installed in order to the following
    Red Hat:
    http://msdn.microsoft.com/MSDN-FILES/027/001/779/install.htm
    I moved the .jsp app over to the Red Hat 9 server running Tomcat, while
    keeping the MS SQL 2000 on windows. The issue I have is setting up the
    JDBC driver for SQL Server 2000 on the Red Hat server.
    I created a folder called /usr/java/MSSQLdriver and unzipped the tar file with
    the driver for SQL Server 2000. And ran the install.ksh script.
    The /usr/java/MSSQLdriver/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    I chmod 0777 each of the *.jar files.
    I then went into /etc/profile.d/tomcat.sh and adding the following:
    CLASSPATH=.;/opt/msSQLjdbc/lib/msbase.jar;/opt/msSQLjdbc/lib/msutil.jar;/opt/msSQLjdbc/lib/mssqlserver.jar
    Each time I login and pull up the termial I get the following error:
    bash: /opt/msSQLjdbc/lib/msbase.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/msutil.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/mssqlserver.jar: cannot execute binary file
    And can't connnect to the database within the .jsp app.
    Is there anyone out there using DBC driver for SQL Server 2000 on the Red Hat server?
    Michael

    Sorry, I needed to correct some information of where the drivers were installed.
    I created a folder called /usr/java/MSSQLdriver/new and untar the Microsoft file with the driver for SQL Server 2000. I ran the install.ksh script "sh install.ksh"
    installed the driver into the default directory "/opt/msSQLjdbc".
    The /opt/msSQLjdbc/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    Michael

  • SS2K_SYSLOGINS ORA-01401 using WB for SQL server 2000

    Hi there,
    I've read some threads on this issue on this forum but no solution to be found.
    I noticed that the NAME field on the table SS2K_SYSLOGINS has been declared as varchar2(30) and is reading the SYSLOGINS views column NAME ( as declared sysname 128 ) on SQL server 2000.
    This view (based on tabel sysxtypes) is not only containing SQL-logins but also domain users and domain groups ( like "domainxxx.com\SL-DAFEHV-DB-TorqueSupervisor-Admin"
    These domain name sometimes are far over 30 characters in length !!!
    I download the Migration Workbench ( 10.1.0.4.0 ) and some pluging today ( from http://www.oracle.com/technology/software/tech/migration/workbench/index.html )and I'm running WB 10 and Ora 9.2 both on the same server.
    How to solve this problem.
    Please help me out.
    Guus

    Guus,
    [It was a new bug, I searched the bug database but could not find something relevant]
    We will migrate what we can automate, so if there is more we can automate in future send in the details. Can you send in the database as a testcase?
    I had to alter the SS2K_SYSINDEXES as well and had to set the columns FIRST, ROOT, and FIRTSIAM to allow 'null' !!!That is not logged either, which surprises me.
    There was an assessment tool to give you an idea of the complexity of the migration that was used internally.
    >
    Further more I encoutered some warning ( i will not list them all )
    A) Within SQL server there are other pre-reserved words as within Oracle.I am not clear what you mean, is the parser failing on not handled reserved words like for example XML features?
    B) It cannot handle hops to other databases within/on the same server ( almost the same as using other schema's within Oracle )Consolidation is one of the proposed features of the next release.
    C) It cannot deal with the different authentication setup within SQL server 2000 ( databaselink.database.owner.objectname )Will note for future reference.
    C2 ) Is it possible to capture related objects from different databases ( ora schema's ) when encoutering them during capture ( the master database has been queried during the capturing as well. . . ) ?You just choose which databases you want to capture the workbench does not work out what parts of database b are called by database a. It was hoped there would be better tools for reorganising schemas when you got to oracle i.e. it was hoped it was out of our scope.
    D) It cannot handle;
    temptablesTemptables in stored procedures are mapped to oracle temporary tables, whos structure is permanent but the data can be temporary: for example tied to the session. Unhandled temptables in particular situations are a bug.
    system procedures like sp_executesql / xp_cmdshell / xp_smtp_send_mail / sp_oacreateWhile the functionality exists in oracle emulating xp_ and sp_ functions has not been done.
    function such as NEWID()
    user difined functionsI will note this for further reference.
    calls to the filesystem ( checking / writing to / reading from / deleting files )While the functionality exists in oracle emulating these functions has not been done.
    commandline call ( using xp_cmdshell )
    owner prefixes ( schema call as used by Oracle )I think this is done, if it is not done in some places it is a bug.
    N' parameter prefixes
    and so on , and so on
    Think I better skip trying "Migration Workbench" and look for an other way to handle a migration from SQL server 2000 to Oracle 92.We did provide a service to do this for a fee I am not sure if it is still going. Other tools did not seem substancially better than the workbench.
    >
    My next chalange is to migrate from Informix 7x to Oarcle 9.2 ( Hmmmmm )The workbench also does this, but it is not a single click automatic operation.
    Please tell me [at turloch.otierney at oracle.com] if you find other products that are better. What they do better, oracle can do better next time.
    It is probably not a good idea to post this information publically on this Oracle forum.
    I apologise that your expectations were not met at this time.
    Turloch
    Message was edited by:
    totierne

  • JDBC driver for MS SQL Server 2000??

    I'm moving to weblogic 8.1 (from 7.0), and am facing a series of problems.
    This one is related to JDBC driver. The driver(from Microsoft) I used with weblogic
    7.0 doesn't work with 8.1. The exception I get when I try to execute a statement
    is:
    [ java.sql.SQLException: This JDBC 2.0 method is not implemented ]
    I figured that the driver doesn't support JDK 1.4. So, I tried using BEA driver
    that come with 8.1, but it fails while executing a prepared statement.
    Here's the stack trace:
    java.sql.SQLException: [BEA][SQLServer JDBC Driver]Invalid parameter binding(s).
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.preImplExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.downgradeAndRetryExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
         at com.actiontech.jmetro.util.sql.DBSession.executePreparedQuery(DBSession.java:167)
    Does anyone know what the problem is? Everything worked fine on 7.0. Or can anyone
    suggest a good driver for SQL server 2000 that works with weblogic 8.1/jdk 1.4?
    TIA
    Vas

    Today everything seems to be working fine!
    All I did was clean up weblogic directories, restart the server, close & reopen
    my IDE and redeploy my application. The problem just disappeared. I couldn't believe
    it, so I kept hammering it (redeploying and running testcases) .. and after several
    cycles.. got the problem again. Did the cleanup again.. and things are ok. So,
    I guess nothing wrong with the JDBC drivers(although the one from Microsoft doesn't
    support JDK1.4 officially), and its the weblogic that needs some cleanup time
    to time. Don't know if this happens only in dev mode, but if it happens in production
    mode also, then its another serious problem.
    Thanks a lot guys.
    "vas pulipati" <[email protected]> wrote:
    >
    I'm moving to weblogic 8.1 (from 7.0), and am facing a series of problems.
    This one is related to JDBC driver. The driver(from Microsoft) I used
    with weblogic
    7.0 doesn't work with 8.1. The exception I get when I try to execute
    a statement
    is:
    [ java.sql.SQLException: This JDBC 2.0 method is not implemented ]
    I figured that the driver doesn't support JDK 1.4. So, I tried using
    BEA driver
    that come with 8.1, but it fails while executing a prepared statement.
    Here's the stack trace:
    java.sql.SQLException: [BEA][SQLServer JDBC Driver]Invalid parameter
    binding(s).
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown
    Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown
    Source)
         at weblogic.jdbc.base.BasePreparedStatement.preImplExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.downgradeAndRetryExecute(Unknown
    Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
         at com.actiontech.jmetro.util.sql.DBSession.executePreparedQuery(DBSession.java:167)
    Does anyone know what the problem is? Everything worked fine on 7.0.
    Or can anyone
    suggest a good driver for SQL server 2000 that works with weblogic 8.1/jdk
    1.4?
    TIA
    Vas

  • Error while connecting to SQL Server 2000 using Heteregenous Services 11g

    Hope this is the right thread to post on! We have been given the challenge of connecting to and reading data from a SQL Server 2000 database.
    Our Infrastructure guys have set up the network access.
    The SQL Server DB is set to windows NT Authentication only (N.B. NOT Mixed Mode) as there is an application running against the DB locally that will not run under Mixed Mode.
    Our Oracle partner has download and installed the 11g Heteregenous Services. all works fine until the point we try to create the DBLink and then connect to the SQL Server DB when we get:
    SQL> CREATE DATABASE LINK infoteam1.sco.infoteam.co.uk CONNECT TO "sco.infoteam.co.uk/infoteam" IDENTIFIED BY "########" USING 'dg4msql';
    Database link created.
    SQL> select * from "systables"@infoteam1.sco.infoteam.co.uk;
    select * from "systables"@infoteam1.sco.infoteam.co.uk
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Oracle][ODBC SQL Server Driver][SQL Server]Login failed for user
    'sco.infoteam.co.uk/infoteam'. Reason: Not associated with a trusted SQL Server
    connection.[Oracle][ODBC SQL Server Driver]Invalid connection string attribute
    ORA-02063: preceding 2 lines from INFOTEAM1.SCO.INFOTEAM.CO.UK
    The question is can we (and if so how)?) connect to the SQL Server using an NT Windows Authorised account?
    Jeremy

    Hi,
    Please look at MOS note
    ORA-28500: Generic connectivity using ODBC DSN over mapped drive fails [ID 105210.1]
    Ora-28500 with Ms Sqlserver - Not associated with a trusted SQL Server connection [ID 333775.1]
    Regards,
    Edited by: gjilevski1 on Aug 31, 2010 8:23 AM

Maybe you are looking for

  • TS3694 i have an unknown error 2006. what am i supposed to do?

    I have an unknown error 2006  for my Iphone 5 when I tried doing a recovery mode using itunes. What should I do?

  • Unable to update DVM in MDS with upload through em

              Hello all I'm working on two environment : dev1 and dev2 I'm able to deploy a MDS on dev1 by zipping all the content in a "metadata.zip" file and uploading it to the dev1 through entreprise manager console. When I do the same thing on dev2,

  • How to add Oracle DB as an external source in Hyperion Scorecards?

    Hi, I'm pretty new to Hyperion. I need to build scorecards for KPI's defined using Hyperion Performance Scorecards. Im using OBIEE as the analytical reporting tool and Oracle 10g as my DB. What needs to be done to access the KPI data from the Oracle

  • StoreFront demo issue

    Hi I am newbie to ADF. I downloaded StoreFrontDemo and I am trying to run it. I am getting following running wls server log: *** Using HTTP port 7101 *** *** Using SSL port 7102 *** C:\Users\bngajend.ORADEV\AppData\Roaming\JDeveloper\system11.1.2.1.3

  • Container's validate does not update removal

    the validate() method does not update the display to show the remval of a component from a container. A way to go around: use repaint() instead. Please see the following code: import java.awt.BorderLayout; import java.awt.event.ActionEvent; import ja