I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row update
failed" while updating an int value on result set. Below is the code snippet
that i use in java. The error is occurring occasionally. Not able to
replicate.
strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
PreparedStatement objPS = null;
...get the connection object, prepare object...using msjdbc driver with SQL
server 2000
ResultSet objRS = objPS.executeQuery();
objRS.updateInt("intCol", 2);
objRS.updateRow();
any help is appreciated.
Thanks in advance.
| Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| thread-index: AcUbT0uzY+NiEZNfSCeDqAYi6cibWQ==
| X-WBNR-Posting-Host: 152.160.15.58
| From: "=?Utf-8?B?U2FyYW4=?=" <Saran@.discussions.microsoft.com>
| Subject: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| Date: Fri, 25 Feb 2005 07:33:03 -0800
| Lines: 15
| Message-ID: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6702
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row
update
| failed" while updating an int value on result set. Below is the code
snippet
| that i use in java. The error is occurring occasionally. Not able to
| replicate.
|
| strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
| PreparedStatement objPS = null;
| ...get the connection object, prepare object...using msjdbc driver with
SQL
| server 2000
| ResultSet objRS = objPS.executeQuery();
| objRS.updateInt("intCol", 2);
| objRS.updateRow();
|
| any help is appreciated.
| Thanks in advance.
|
What is the frequency of this problem? Did the problem occur while other
activity the same database was occurring? Do you have a primary key
defined on the table? Which options did you use when preparing the
statement? Are you using the most recent build of the JDBC driver?
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|||Hi Carb, thanks for your reply, here is my answers for your questions. Hope
that will help us to resolve the issue.
1. What is the frequency of this problem? - not able to determine,
occurring occasinoaly.
2. Did the problem occur while other activity the same database was
occurring? - I couldn't make sure it 100% though, i am possitive that there
could be some other activity on the database.
3. Do you have a primary key defined on the table? - Yes e.g. table script
tbl1(col1 varchar(100) NOT NULL, col2 int NULL)
here: col1 is primary key - but i am trying to update col2
4. Which options did you use when preparing the statement? - here is e.g.
objCon.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY)
5. Are you using the most recent build of the JDBC driver? MS-JDBC SP2
thanks
-Saran
""Carb Simien [MSFT]"" wrote:
> --
> | Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
> | thread-index: AcUbT0uzY+NiEZNfSCeDqAYi6cibWQ==
> | X-WBNR-Posting-Host: 152.160.15.58
> | From: "=?Utf-8?B?U2FyYW4=?=" <Saran@.discussions.microsoft.com>
> | Subject: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
> | Date: Fri, 25 Feb 2005 07:33:03 -0800
> | Lines: 15
> | Message-ID: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.jdbcdriver
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> | Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6702
> | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> |
> | I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row
> update
> | failed" while updating an int value on result set. Below is the code
> snippet
> | that i use in java. The error is occurring occasionally. Not able to
> | replicate.
> |
> | strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
> | PreparedStatement objPS = null;
> | ...get the connection object, prepare object...using msjdbc driver with
> SQL
> | server 2000
> | ResultSet objRS = objPS.executeQuery();
> | objRS.updateInt("intCol", 2);
> | objRS.updateRow();
> |
> | any help is appreciated.
> | Thanks in advance.
> |
> What is the frequency of this problem? Did the problem occur while other
> activity the same database was occurring? Do you have a primary key
> defined on the table? Which options did you use when preparing the
> statement? Are you using the most recent build of the JDBC driver?
> Carb Simien, MCSE MCDBA MCAD
> Microsoft Developer Support - Web Data
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
>
|||saran wrote:
> 4. Which options did you use when preparing the statement? - here is
e.g.
> objCon.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY)
And if the ResultSet was created as read only how do you expect
updateRow() to work? Speaking of which, if the error message would have
been "General error" or simply "Error", it would have been just as easy
to track down the cause.
Alin,
The jTDS Project.
|||| Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| thread-index: AcUpfTtxzBvD5vNlRPaQXIKezzsWHg==
| X-WBNR-Posting-Host: 152.160.15.58
| From: "=?Utf-8?B?c2FyYW4=?=" <saran@.discussions.microsoft.com>
| References: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.microsoft.com>
<zQR4wCMKFHA.1136@.TK2MSFTNGXA02.phx.gbl>
| Subject: RE: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| Date: Tue, 15 Mar 2005 08:37:09 -0800
| Lines: 86
| Message-ID: <4F9F2476-D4EE-4EA1-8288-B9C2EB8D5A30@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6756
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| Hi Carb, thanks for your reply, here is my answers for your questions.
Hope
| that will help us to resolve the issue.
|
| 1. What is the frequency of this problem? - not able to determine,
| occurring occasinoaly.
|
| 2. Did the problem occur while other activity the same database was
| occurring? - I couldn't make sure it 100% though, i am possitive that
there
| could be some other activity on the database.
|
| 3. Do you have a primary key defined on the table? - Yes e.g. table script
| tbl1(col1 varchar(100) NOT NULL, col2 int NULL)
| here: col1 is primary key - but i am trying to update col2
|
| 4. Which options did you use when preparing the statement? - here is e.g.
| objCon.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE,
| ResultSet.CONCUR_READ_ONLY)
|
| 5. Are you using the most recent build of the JDBC driver? MS-JDBC SP2
|
| thanks
| -Saran
|
| ""Carb Simien [MSFT]"" wrote:
|
| >
| > --
| > | Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update
failed
| > | thread-index: AcUbT0uzY+NiEZNfSCeDqAYi6cibWQ==
| > | X-WBNR-Posting-Host: 152.160.15.58
| > | From: "=?Utf-8?B?U2FyYW4=?=" <Saran@.discussions.microsoft.com>
| > | Subject: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| > | Date: Fri, 25 Feb 2005 07:33:03 -0800
| > | Lines: 15
| > | Message-ID: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.jdbcdriver
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| > | Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6702
| > | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
| > |
| > | I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row
| > update
| > | failed" while updating an int value on result set. Below is the code
| > snippet
| > | that i use in java. The error is occurring occasionally. Not able to
| > | replicate.
| > |
| > | strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
| > | PreparedStatement objPS = null;
| > | ...get the connection object, prepare object...using msjdbc driver
with
| > SQL
| > | server 2000
| > | ResultSet objRS = objPS.executeQuery();
| > | objRS.updateInt("intCol", 2);
| > | objRS.updateRow();
| > |
| > | any help is appreciated.
| > | Thanks in advance.
| > |
| >
| > What is the frequency of this problem? Did the problem occur while
other
| > activity the same database was occurring? Do you have a primary key
| > defined on the table? Which options did you use when preparing the
| > statement? Are you using the most recent build of the JDBC driver?
| >
| > Carb Simien, MCSE MCDBA MCAD
| > Microsoft Developer Support - Web Data
| >
| > Please reply only to the newsgroups.
| > This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| > Are you secure? For information about the Strategic Technology
Protection
| > Program and to order your FREE Security Tool Kit, please visit
| > http://www.microsoft.com/security.
| >
| >
|
Yes, you will need to use Resultset.CONCUR_UPDATABLE to allow the updates..
Also, the most recent build of the Microsoft JDBC driver is JDBC SP3
(build 2.2.0040):
SQL Server 2000 Driver for JDBC Service Pack 3
http://www.microsoft.com/downloads/d...B11-0502-461A-
B138-2AA54BFDC03A&displaylang=en
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Showing posts with label updating. Show all posts
Showing posts with label updating. Show all posts
Tuesday, March 6, 2012
Thursday, February 16, 2012
[ask] how to run a trigger or store precedure in certain date?
hello, i have a database that will be updated on a certain date
i have a column "UPDATE_DATE" which specifies the updating date, my question is
"how should i make the trigger or stored procedure runs only on the date that has been specified"
thanks for the assistance
Create a job that runs once everyday and compares the date on the dat with the value in the column, and calls the proc if they match.|||ok, i think that will be good idea since sqlexpress doesn't come with sqlagent
ok then, i'll try to code by that algorithm. thx anyway bro
Saturday, February 11, 2012
@@Version not updating
Greetings,
I recently installed Service Pack 4 on SQL 2000. The install went
smooth with no errors and a message at the end stating the install
completed successfully. I rebooted the server (Windows Server '03) and
tried to check the @.@.Version global variable but it still lists only
Service Pack 1.
Could it be that SP4 didn't install? Or is it more likely something
else is preventing the @.@.Version from updating?
Thanks in advance,
BenHi Ben
What do you get from
SELECT SERVERPROPERTY('ProductLevel')
HTH
Kalen Delaney, SQL Server MVP
"sullins602" <ben.sullins@.gmail.com> wrote in message
news:1152814872.081466.270730@.s13g2000cwa.googlegroups.com...
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Hi Ben,
Looks like @.@.version does not show the SQL Server service pack number but a
version number. Check for a number like 8.00.2039. Probably the service pack
listed is for the operating system.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"sullins602" wrote:
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Thats it! I was looking at the service pack for the OS not the
database. Thanks for your help fellas...
-ben
I recently installed Service Pack 4 on SQL 2000. The install went
smooth with no errors and a message at the end stating the install
completed successfully. I rebooted the server (Windows Server '03) and
tried to check the @.@.Version global variable but it still lists only
Service Pack 1.
Could it be that SP4 didn't install? Or is it more likely something
else is preventing the @.@.Version from updating?
Thanks in advance,
BenHi Ben
What do you get from
SELECT SERVERPROPERTY('ProductLevel')
HTH
Kalen Delaney, SQL Server MVP
"sullins602" <ben.sullins@.gmail.com> wrote in message
news:1152814872.081466.270730@.s13g2000cwa.googlegroups.com...
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Hi Ben,
Looks like @.@.version does not show the SQL Server service pack number but a
version number. Check for a number like 8.00.2039. Probably the service pack
listed is for the operating system.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"sullins602" wrote:
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Thats it! I was looking at the service pack for the OS not the
database. Thanks for your help fellas...
-ben
@@Version not updating
Greetings,
I recently installed Service Pack 4 on SQL 2000. The install went
smooth with no errors and a message at the end stating the install
completed successfully. I rebooted the server (Windows Server '03) and
tried to check the @.@.Version global variable but it still lists only
Service Pack 1.
Could it be that SP4 didn't install? Or is it more likely something
else is preventing the @.@.Version from updating?
Thanks in advance,
BenHi Ben
What do you get from
SELECT SERVERPROPERTY('ProductLevel')
--
HTH
Kalen Delaney, SQL Server MVP
"sullins602" <ben.sullins@.gmail.com> wrote in message
news:1152814872.081466.270730@.s13g2000cwa.googlegroups.com...
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Hi Ben,
Looks like @.@.version does not show the SQL Server service pack number but a
version number. Check for a number like 8.00.2039. Probably the service pack
listed is for the operating system.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"sullins602" wrote:
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Thats it! I was looking at the service pack for the OS not the
database. Thanks for your help fellas...
-ben
I recently installed Service Pack 4 on SQL 2000. The install went
smooth with no errors and a message at the end stating the install
completed successfully. I rebooted the server (Windows Server '03) and
tried to check the @.@.Version global variable but it still lists only
Service Pack 1.
Could it be that SP4 didn't install? Or is it more likely something
else is preventing the @.@.Version from updating?
Thanks in advance,
BenHi Ben
What do you get from
SELECT SERVERPROPERTY('ProductLevel')
--
HTH
Kalen Delaney, SQL Server MVP
"sullins602" <ben.sullins@.gmail.com> wrote in message
news:1152814872.081466.270730@.s13g2000cwa.googlegroups.com...
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Hi Ben,
Looks like @.@.version does not show the SQL Server service pack number but a
version number. Check for a number like 8.00.2039. Probably the service pack
listed is for the operating system.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"sullins602" wrote:
> Greetings,
> I recently installed Service Pack 4 on SQL 2000. The install went
> smooth with no errors and a message at the end stating the install
> completed successfully. I rebooted the server (Windows Server '03) and
> tried to check the @.@.Version global variable but it still lists only
> Service Pack 1.
> Could it be that SP4 didn't install? Or is it more likely something
> else is preventing the @.@.Version from updating?
> Thanks in advance,
> Ben
>|||Thats it! I was looking at the service pack for the OS not the
database. Thanks for your help fellas...
-ben
Subscribe to:
Posts (Atom)