Search text in sql server 2000

how can i preapre a script to search all stored procedure, view, etc. which contain search text. just list out all the sp name, view name.

select distinct
object_name([id]) as obj_name,
case
when objectproperty([id], 'IsProcedure') = 1 then 'stored procedure'
when objectproperty([id], 'IsScalarFunction') = 1 then 'scalar function'
when objectproperty([id], 'IsTableFunction') = 1 then 'table function'
when objectproperty([id], 'IsView') = 1 then 'view'
end as obj_type
from
syscomments
where
objectproperty([id], 'IsProcedure') = 1
or objectproperty([id], 'IsScalarFunction') = 1
or objectproperty([id], 'IsTableFunction') = 1
or objectproperty([id], 'IsView') = 1
and objectproperty([id], 'IsMSShipped') = 0
and [text] like '%orderid%'
order by
obj_type, obj_name
go
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • BCP - Error with column text in sql server 2000

    Hi,
    Im trying to restore a bcp using the command: 
    bcp "db.dbo.tb_log_old" in "tb_log2013.out" -SSERVER -T -n
    Im using SQL 2000 with the table below
    CREATE TABLE [dbo].[tb_log_old](
    [cd_id] [int] NULL,
    [cd_servico] [int] NULL,
    [dt_ocorrencia] [datetime] NULL,
    [nm_xml_entrada] [text] NULL,
    [nm_xml_saida] [text] NULL,
    [dt_inicio_processamento] [datetime] NULL,
    [dt_fim_processamento] [datetime] NULL
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    I have got the error
    Starting copy...
    SQLState = S1001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Memory allocation failure
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
    SQLState = 37000, NativeError = 4810
    Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Expected the TEXT token in data stream for bulk copy of text or image data.
    BCP copy in failed

    I tried with binary and nvarchar but I got the error below:
    Can I get just 2 columns in the bcp?
    Starting copy...
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    BCP copy in failed

  • Workarounds for searching a text field in SQL Server 2000

    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk

    Note that some databases (or Oracle, at least) provide alternatives to
    LIKE '%foo%' that are more efficient for large text blocks, given that
    you have the appropriate indexing plugins etc. etc.
    To use one of those types of search operators, you'd have to put
    together a custom extension.
    -Fred
    Fred Lucas <[email protected]> wrote:
    I'm assuming that when you say 'a text field', you're referring to a
    SQLServer TEXT field, as opposed to just any old field that contains
    text.
    Like I said, I'm by no means a SQLServer pro, but I just ran:
    SELECT CLOBSTRINGX
    FROM LOCATORTESTOBJECTX
    WHERE CLOBSTRINGX LIKE '%o%';
    and got back my test row with 'foo' in the CLOBSTRINGX column.
    CLOBSTRINGX is a TEXT column.
    So, it is possible that our stringContains() extension will just work.
    But then again, maybe not. I'm guessing it will.
    Give it a try and, if you get an error, post the generated SQL (turn on
    SQL output by setting the com.solarmetric.kodo.Logger property to
    'stdout') and the error that you get. Also, try executing the generated
    SQL directly against your data store to see if it works there.
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Basically I just want to use kodo's extended stringContains syntax on a
    text field. Is this possible?
    Khamsouk
    Fred Lucas wrote:
    I'm not intimitely familiar with SQLServer's text searching
    capabilities, but I'm confident that you could create a query extension
    that would do what you need it to do.
    What is the SQL that you are trying to generate?
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • How to load data to a SQL Server 2000 from a text file ( fixed / delimited)

    I am a navie user to ODI, just installed some time back. And I wanted to load text data ina file ( fixed length/ delimited ) to SQL server 2000 database.
    Iam intrested to know the steps I need to take to achieve this. I mean for example first creating topology,next designer..
    Could you please provide some books/articles or any documents that talt about these steps clearly one-by-one.

    Hi,
    Oracle Data Integrator - Getting Started with an ETL Project
    follow this manuel step by step and you will be able to load data from file to any database...

  • Regarding ReCreating Catalog in SQL Server 2005 which was existing in SQL Server 2000

    Hello
    I was using SQL SERVER 2000 ... In one table I've created FULL TEXT SEARCHING ( Full text catalog along with full text indexing)
    Now we had to install our db in SQL SERVER 2005 standard edition. But while taking script it gave me two lines like:
    if (select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')) <> 1
    exec sp_fulltext_database N'enable'
    GO
    if not exists (select * from dbo.sysfulltextcatalogs where name = N'DEV_CAS_DiagnosisCatalog')
    exec sp_fulltext_catalog N'DEV_CAS_DiagnosisCatalog', N'create'
    GO
    so I used this in the new db creation script...
    But I couldn't get where it actually is in SQL SERVER 2005 standard edition.
    and also plz help how should we create if it doesn't exist...
    What could be the problem....
    Thanks In advance

    if (select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')) <> 1
    exec sp_fulltext_database N'enable'
    GO
    if not exists (select * from dbo.sysfulltextcatalogs where name = N'DEV_CAS_DiagnosisCatalog')
    exec sp_fulltext_catalog N'DEV_CAS_DiagnosisCatalog', N'create'
    GO
    sp_fulltext_catalog [ @ftcat= ] 'fulltext_catalog_name' ,
    [ @action= ] 'action'
    [ , [ @path= ] 'root_directory' ]
    Full-text catalog and index data is stored in files created in a full-text catalog directory(not on SSMS). The full-text catalog directory is created as a sub-directory of the directory specified in
    @path or in the server default full-text catalog directory if
    @path is not specified. The name of the full-text catalog directory is built in a way that guarantees it will be unique on the server. Therefore, all full-text catalog directories on a server can share the same path.
    Refer the path column by running the below query. full text catalog file is created under the root directory by default if the path is not specified.
    select * from dbo.sysfulltextcatalogs where name = N'DEV_CAS_DiagnosisCatalog'
    Refer
    http://technet.microsoft.com/en-us/library/ms189520(v=sql.90).aspx
    Regards, RSingh

  • Oracle XE connection to SQL Server 2000

    Hello everybody,
    I need to make a connection to a table in SQL Server 2000. I am using Oracle XE with Apex 3.0.1.
    SQL and XE are on the same server(windows server 2003).
    I need to make an application that uses some data of the SQL Server and for the rest it uses data from Oracle XE.
    How can I make this connection to SQL Server from Oracle XE? Some suggestion where I should start, would be great.
    It would be great if the Apex developers would not notice that the data is retrieved from SQL Server, is this possible?
    For 10g there is a gateway for this I believe, but not for XE.
    Thank you for your time!

    Thanks, after searching some information about Heterogeneous Services.
    I came accross this site http://www.databasejournal.com/features/oracle/article.php/10893_3442661_1
    I followed the instructions but I get the following error:
    SQL> create database link sqlxe connect to testuser identified by testuser USING
    'SQLXE';
    Database link created.
    SQL> desc employess@sqlxe
    ERROR:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from SQLXE
    I searched for the error ORA-28545 and followed some suggestions but I cannot find a solution.
    Here some information that might be usefull (sqlxe is the connectionname):
    C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\Listener.ora
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = SQLXE)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = hsodbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    LISTENERSQLXE =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    DEFAULT_SERVICE_LISTENER = (XE)
    C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\tnsnames.ora
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = win2003)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    SQLXE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA =
    (SID=SQLXE)
    (HS=OK)
    lsnrctl start listenersqlxe
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-NOV-2007 10:46
    :31
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\ad
    min\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log
    \listenersqlxe.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc))
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    STATUS of the LISTENER
    Alias listenersqlxe
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 08-NOV-2007 10:46:34
    Uptime 0 days 0 hr. 0 min. 3 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listenersqlxe.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc)))
    The listener supports no services
    The command completed successfully
    lsnrctl status listenersqlxe
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-NOV-2007 10:47
    :24
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    STATUS of the LISTENER
    Alias listenersqlxe
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 08-NOV-2007 10:46:34
    Uptime 0 days 0 hr. 0 min. 52 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listenersqlxe.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc)))
    The listener supports no services
    The command completed successfully
    Thanks in advance

  • MS SQL Server 2000 + JDBC

    Hi everyone,
    I know many of you don't like microsoft products, but I am getting weird errors when i connect my java program to SQL server 2000 with its driver. My code worked FINE with MS Access. The thing is I know there are some bugs to SQL server driver , and somebody knowledgeable with this software could def help me fix the problem, but i searched all over the microsoft site, couldnt find a fix to my problem, and contacting microsoft for help costs between $195-$245. I was wondering if somebody here is familiar with this software. I would really appreciate it if you could email me at [email protected] I will post all of the problem here also.
    I'm getting the following error when i try to create a insert a new function (create a new row) in my database:
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'Function'.
    Here is the relevant code:
    <code>
    try{
    DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver() );
    } catch (Exception e) {
    System.out.println(e.getMessage());
    try{
    Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://NJ8650MONDAL", "m", "m");
    con.setAutoCommit(false);
    PreparedStatement insertFvalues = con.prepareStatement("INSERT INTO function_description (Function, Description, Notes) VALUES (?,?,?)");
    insertFvalues.setString(1,functionname);
    insertFvalues.setString(2,descriptionname);
    insertFvalues.setString(3,notesname);
    insertFvalues.execute();
    PreparedStatement insertRvalues = con.prepareStatement("INSERT INTO return_code_description (Function_Name, Return_Codes, Return_Codes_Description) VALUES (?,?,?)");
    insertRvalues.setString(1,functionname);
    insertRvalues.setString(2,rvvaluesname);
    insertRvalues.setString(3,rvdescripname);
    insertRvalues.close();
    con.commit();
    insertFvalues.close();
    insertRvalues.close();
    con.close();
    } catch (SQLException e) {System.out.println(e.getMessage());
    }</code>

    thanks. i fixed that error, so now that portion works. however, i have a question..
    SQL server does not allow comparisons between text fields unless the IS NULL or LIKE operators are used. I'm using JDBC to load exisiting entries from the database and display them in a gui. THe thing is I have one main table, which has a one-to-many relationship with my other tables..so the way i linked them was to have one column in each table hold the same text data, and then i can use the = operator to see if there are matches..
    for example one table (function_description) has the following data:
    Function_Name_Ind Description Notes
    sample blah blah
    And another table (return_code_description)has the following data:
    Function_Name Return_Code Return_Code_Description
    sample x xx
    sample y yy
    And I want all of this displayed.
    i don't know if that explanaiton is any good, but seeing the code below might help you understand..
    <code>
    try{
    Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://NJ8650MONDAL", "m", "m");
    con.setAutoCommit(true);
    Statement stmt = con.createStatement();
    ResultSet result = stmt.executeQuery("SELECT * FROM function_description, return_code_description " + "WHERE function_description.Function_Name_Ind = return_code_description.Function_Name AND (((Function_Name_Ind)='"+ functionname + "'))");
    result.next();
    function.setText(result.getString("Function_Name_Ind"));
    description.setText(result.getString("Description"));
    notes.setText(result.getString("Notes"));
    rvalues.setText(result.getString("Return_Codes"));
    rvdescrip.setText(result.getString("Return_Codes_Description"));
    stmt.close();
    con.close();
    } catch (SQLException e) {System.out.println(e.getMessage());
    </code>
    And i'm getting this error.
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
    Can any of you think of another way I can do this? IS there another way in JDBC I can write it?
    thanks!

  • What is the different between Sharepoint fast search service and Sql server fulltext search?

    HI ,
    I want to kow what is the different between Sharepoint fast search service and Sql server fulltext search?
    Or Can I abstract the Sharepoint fast search from the Sharepoint platform as a isolate component?
    Thank you.
    James

    They are very, very different beasts.
    Firstly FAST Search for SharePoint is the old name for the product and is only relevant for SharePoint 2010 not 2013. It got merged into the standard SharePoint search for the 2013 release.
    SharePoint search is aimed at providing a Bing or Google like experience for your intranet content, as well as providing some nifty features that are purely SharePoint releated along the way. That means it can crawl SharePoint content, file shares,
    outlook mailboxes, internal and external websites and probably fifty other different things if you really tried. Whilst i'm not an expert on SQL full text search I believe it's intended to provide a search feature for content held within SQL databases
    and tables.
    Can you run SharePoint purely for Search? Yes, definitely.

  • Java and MS SQL Server 2000 problem, please help

    please help me. I am using java and MS SQL Server 2000, and I'm trying to access and verify the login. I'm getting the following error message: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    Can any please help in this regard.
    String userNumber = (String)userNumField.getValue();
    char[] userPasswordArray = userPasswordField.getPassword();
    String userPassword = new String(userPasswordArray);
         try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Dikolobe_Data");
                java.sql.PreparedStatement statement = connection.prepareStatement(
                        "SELECT USER_NUMBER, USER_PASSWORD, USER_CLASS, USER_STATUS " +
                        "FROM SYS_USER " +
                        "WHERE (USER_NUMBER = ? AND USER_PASSWORD = ?);");
                statement.setString(1, userNumber);
                statement.setString(2, userPassword);
                java.sql.ResultSet result = statement.executeQuery();
                if(result.next()) {
                    String userStatus = result.getString(4);
                    if(userStatus.equals("logged on")) {
                        String loginErrorMessage = "User with number: " + userNumber + " is already logged on.";
                        javax.swing.JOptionPane loginErrorPane = getNarrowOptionPane(72);
                        loginErrorPane.setMessage(loginErrorMessage);
                        loginErrorPane.setMessageType(javax.swing.JOptionPane.ERROR_MESSAGE);
                        javax.swing.JDialog loginErrorDialog = loginErrorPane.createDialog(null, "Login Error");
                        loginErrorDialog.setVisible(true);
                    else {
                        String userClassification = result.getString(3);
                        if(userClassification.equals("Administrator")) {
                            AdminHomePage newAdminHomePage = new AdminHomePage();
                            newAdminHomePage.setVisible(true);
                        else if(userClassification.equals("Educator")) {
                            EduHomePage newEduHomePage = new EduHomePage();
                            newEduHomePage.setVisible(true);
                        statement = connection.prepareStatement(
                                "UPDATE SYS_USER SET USER_STATUS = ? " +
                                "WHERE USER_NUMBER = ?");
                        statement.setString(1, "logged on");
                        statement.setString(2, userNumber);
                        statement.executeUpdate();
                        dispose();
                }

    Doesn't the following link give you enough information?
    http://www.google.com/search?q=invalid+descriptor+index
    Anyway .. This error means that the given ResultSet column index which you're trying to retrieve the value from is out of the range.

  • Which Driver for MS SQL-Server 2000

    Hello,
    i need to access a MS SQL-Server 2000 and want to ask which driver you think is the best one for this problem.
    I am not a big fan of using beta-Software, and i do not need the newest state-of-the-art features. Right now i also do not need Connection-Pooling.
    Only a few SQL SELECT/UPDATE-Statements nothing more.
    But maybe in not far away future, Conn-Pooling and Procedure-Calls could be interesting. And i think Type 3 or 4 would be the best decision.
    The Software will run on NT, but i do not want to use the JDBC/ODBC-Bridge, because it is so unbelievable slow.
    I am interested in WHICH DRIVER you USE, AND especially which drivers you DO NOT USE ANYMORE, and why.
    It would be great, if anyone could help me, finding the best solution.
    P.S.: The price of the driver: It would be good, when it is for free. But if you know a good commercial driver i am also interested in.
    P.P.S: Yes, i have searched for drivers under http://servlet.java.sun.com/products/jdbc/drivers. But there are 37 different Type 3/4 drivers.

    You can try the jtds project .Search for it in www.sourceforge.net. It is derived from FreeTDS JDBC driver. Both of them are Type 4 JDBC drivers. So far I have tried both of them a few years ago. And jtds is more updated (during those time, not sure what the status is right now)
    Or, you can get Microsofts own JDBC driver

  • How to load decimal values into a file using bcp in SQL Server 2000?

    Hi everyone,
    I'm trying to load data from a database table to a text file using bcp on SQL Server 2000. When I'm loading the decimal values, the values before the decimal are not being loaded into the file. How could I load the values before decimals?
    Here are the DDLs and DMLs of what I'm trying to run:
    CREATE TABLE [dbo].[Product_Sales](
    [Year_of_Sale] [smallint] NOT NULL,
    [Product_Type] [varchar](25) NOT NULL,
    [Product_Group] [varchar](25) NOT NULL,
    [Category_Type] [varchar](25) NOT NULL,
    [Category_Group] [varchar](10) NOT NULL,
    [Product_Count] [bigint] NOT NULL,
    [Product_Amount] [decimal](19, 2) NOT NULL,
    [Category_Count] [bigint] NOT NULL,
    [Category_Amount] [decimal](19, 2) NOT NULL,
    CONSTRAINT [PK_Product_Sales] PRIMARY KEY CLUSTERED
    [Year_of_Sale] ASC,
    [Product_Type] ASC,
    [Product_Group] ASC,
    [Category_Type] ASC,
    [Category_Group] ASC
    ) ON [PRIMARY]
    ) ON [PRIMARY]
    INSERT INTO [Yearly_Sales].[dbo].[Product_Sales]
    VALUES(2010, 'Online', 'Web', 'Cameras', 'Electronics', 547, 0.00, 0, 0.00)
    EXEC [master].[dbo].[xp_cmdshell] 'bcp "SELECT * FROM [Yearly_Sales].[dbo].[Product_Sales]" queryout D:\Yearly_Sales\Product_Sales.dat -c -T -S'
    And the output I see in the file is:
    2010 Online Web Cameras Electronics 547 .00 0 .00
    The values before decimals are being truncated.
    Thanks,
    Bangaaram
    Known is a DROP, Unknown is an OCEAN.

    You can modify the decimal column(s) in the table to varchar type before export. But it does not look good.
    alter table [dbo].[Product_Sales]
    Alter column [Product_Amount] varchar(20)
    alter table [dbo].[Product_Sales]
    Alter column [Category_Amount] varchar(20)
    Does that make any sense?
    Known is a DROP, Unknown is an OCEAN.
    Basically you modify the decimal column to a varchar type before you run the bcp command for export. You can modify your source table or you can modify them on the fly. It is just a workaround.
    Modifying the source wouldn't be a good idea. Never do that if you can't get your desired output.
    Known is a DROP, Unknown is an OCEAN.

  • Storing Unicode data in SQL Server 2000

    hello,
    I'm currently developing a website which must store Cyrillic characters in a SQL Server 2000 database. I know the database can store the data correctly because when I use the MS Front end to connect to the database I am able to copy/paste the text into the database columns correctly.
    Retrieving the data from the database also works correctly and is displayed with the correct characters.
    The problems I am having is that the text seems to get garbled during the SQL insert by the database driver. If I print out the SQL just before it is inserted the characters are still correct but once they get into the database they are wrong. I'm using the JDBC drive to connect to the database.
    Any help would be appreciated,
    Alan

    I change the way I was storing the data from using unicode to getting the char values of each letter (ie \u1041 for &#1041;) and storing them in the database. Then I parse the numbers when I bring them back out and combine them into the original String

  • Storing and retrieving arabic in SQL Server 2000

    hello, i realize this problem has been posted lots before but i read in the forum and i couldn't find a solution to fix my problem
    i am developing a desktop application in java and sql server 2000, and i'm using JBuilder for writing my java codes
    here's the problem
    i can MANUALLY store arabic text in my database (directly in SQL Sever Query Analyzer) and can read it in arabic properly in SQL Server, but if i want to retrieve the arabic text in a query in JAVA, for example: select * from person i see weird characters (not question marks) but not the original arabic text
    and if i type arabic text in a java textfield and use the value entered in an sql query, for example:
    sqlQuery = "insert into person (fname) values ('" + jtfFName.getText() + "')";it is inserted in SQL Server as ?????s and when i retrieve the values from the table i also see it as ?????s
    even when i converted all the data types in the database to unicode data types (*nchar* instead of char and nvarchar instead of varchar) and modified the sql query to the following:
    sqlQuery = "insert into person (fname) values (N'" + jtfFName.getText() + "')";(N outside the single quotation mark since according to rules on msdn)
    it still didn't solve the problem
    please i need urgent help with this issue!

    problem was solved by setting the charSet encoding to "UTF-8" in the connection to sql server using the jdbc-odbc bridge

  • BEA WebLogic Commerce Server 3.5 with MS SQL Server 2000 as DB

    Ooops !
    Sorry but in my last mail I forgot to attach the file with the
    stdout log with the described example portal errors. Here is
    the message and the file.
    Davide Pozzi
    Hi to all.
    I have a problem using BEA WebLogic Server 3.5 (with service
    pack 1) with SQL Server 2000 as the database. I followed the
    instructions for SQL Server 7 included in the file readme.txt > in WLCS_35_DDLand the (thin) Web documentation on the
    subject. The I tried to run the example portal and the
    templates examples. All is working well apart from the fact
    that some data seem not to be taken from the database. For
    example the example portal lacks the news titles in the "News > Index" portletand the ads in the "AcmePromotion" portlet. In > the templates examples some logo
    are missing (the E-Business
    Control Center loads, but no campains or discounts, etc. are
    loaded). When I start the example portal, a lot of exceptions > arise. In theattached text file the stdout log of Commerce
    Server is reported.
    Can anyone tell me a hint to solve these problems ? There are > known problemssetting up SQL Server 2000 with Commerce Server > 3.5 ? I've seen that Commerce
    Server 3.5 is not yet certified > for SQL Server 2000, is BEA going to certificate
    it ?
    >
    Thank you in advance for any help.
    Davide Pozzi[errors.txt]

    Ooops !
    Sorry but in my last mail I forgot to attach the file with the
    stdout log with the described example portal errors. Here is
    the message and the file.
    Davide Pozzi
    Hi to all.
    I have a problem using BEA WebLogic Server 3.5 (with service
    pack 1) with SQL Server 2000 as the database. I followed the
    instructions for SQL Server 7 included in the file readme.txt > in WLCS_35_DDLand the (thin) Web documentation on the
    subject. The I tried to run the example portal and the
    templates examples. All is working well apart from the fact
    that some data seem not to be taken from the database. For
    example the example portal lacks the news titles in the "News > Index" portletand the ads in the "AcmePromotion" portlet. In > the templates examples some logo
    are missing (the E-Business
    Control Center loads, but no campains or discounts, etc. are
    loaded). When I start the example portal, a lot of exceptions > arise. In theattached text file the stdout log of Commerce
    Server is reported.
    Can anyone tell me a hint to solve these problems ? There are > known problemssetting up SQL Server 2000 with Commerce Server > 3.5 ? I've seen that Commerce
    Server 3.5 is not yet certified > for SQL Server 2000, is BEA going to certificate
    it ?
    >
    Thank you in advance for any help.
    Davide Pozzi[errors.txt]

  • Error: "PackageFromTheweb" when install SQL Server 2000 cluster

    Hi,
    I am trying to setup a WAS 6.40 system. When I am installing SQL Server 2000 on cluster, I got following error: "This program is used internally by PackageFromTheWeb. It should not be executed directly." Our OS is Windows 2003 Enterprise SP2. Search on the internet many have the same problem but seems no answers. We even completed rebuild OS and install again got the same error message. Very frustration! Realizing the installation has NOT even get to SAP part yet, but any of you see this kind error message when you install SQL Server? How do you fix it?
    Any helpful anwsers are appreciated and reward points.
    Thanks,
    Yujun Ran
    Edited by: Yujun Ran on Mar 18, 2008 3:53 PM

    Suhas,
    Not sure I understand what you are asking. But to answer your question, No, I did not install any software on my desktop. I am logon to the server remotely to install SQL Server 2000.
    Thanks,
    Yujun Ran

Maybe you are looking for

  • New printer and my cartridge is not working

    I brought  a printer 1 month back and im using the printer now, when i inserted the cartridge it is not working. cartridge ligth is blinking. I want to know what is the problem. 

  • Mac Pro Nvidia 8800GT and snow leopard 10.6.4  problems

    I have a Mac pro 1.1 with a Nvidia 8800GT and I have having a lot of problems since update to snow leopard latest release. My computer start to show lines and giggle with lines static and then freeze, it make so bad that you can't do anything even re

  • Enterprise search configuration in SharePoint 2013

    hi friends i have SharePoint publishing site it is configured with enterprise search center.  each page in pages library have different permissions. in my scenario there are two users and four pages user1 has permission to page-1 and page-2, User2 ha

  • Wirelessly connecting Windows laptops to an iMac G5 to share files Interne

    I am wondering if someone could tell me how I can share files with windows PCs wirelessly but also securely. I have setup a network so that Windows PCs can access my iMac G5 that connects to the Internet through the airport card. I can get the window

  • Can't run bluetooth

    I can't run the bluetooth to import my contavt list from my old Nokia 5220