473,804 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error on Update

I'm trying to run SQL Server Stored Procedure to update a single record in
DB from VB 2005 application.
I'm using 2 testing SQL Servers. With the first one there is no problem. I
detached the database from the first server and attached it to the second
one. With the second server I get an error:
"System.Data.Sq lClient.SqlExce ption: A severe error occurred on the current
command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should
be discarded.
at System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
Boolean breakConnection )
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection )
at
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
RunBehavior runBehavior, String resetOptionsStr ing)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult result)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result, String methodName, Boolean sendToPipe)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
G:\_CMS\CMS0416 2007\Client.vb: line 767"

Why could it happen? All Select SPs are working fine. I'm using the same
connection object (of cource with different connection string).

Any help please

vovan
Apr 16 '07 #1
3 3174
On Apr 16, 10:26 am, "vovan" <some...@vovan. comwrote:
I'm trying to run SQL Server Stored Procedure to update a single record in
DB from VB 2005 application.
I'm using 2 testing SQL Servers. With the first one there is no problem. I
detached the database from the first server and attached it to the second
one. With the second server I get an error:
"System.Data.Sq lClient.SqlExce ption: A severe error occurred on the current
command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should
be discarded.
at System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
Boolean breakConnection )
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection )
at
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
RunBehavior runBehavior, String resetOptionsStr ing)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult result)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result, String methodName, Boolean sendToPipe)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
G:\_CMS\CMS0416 2007\Client.vb: line 767"

Why could it happen? All Select SPs are working fine. I'm using the same
connection object (of cource with different connection string).

Any help please

vovan
Can you run the sproc from enterprise manager or query analyzer? You
might also check the event logs on the server to see if it gives a
better description of the error.

Thanks,

Seth Rowe

Apr 16 '07 #2
No problem with executing from Enterprise Manager. I also did not find any
record in Log file related to this problem. I was looking for time when
error happened as well as for anything else related to the problem.

vovan

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
On Apr 16, 10:26 am, "vovan" <some...@vovan. comwrote:
>I'm trying to run SQL Server Stored Procedure to update a single record
in
DB from VB 2005 application.
I'm using 2 testing SQL Servers. With the first one there is no problem.
I
detached the database from the first server and attached it to the second
one. With the second server I get an error:
"System.Data.S qlClient.SqlExc eption: A severe error occurred on the
current
command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any,
should
be discarded.
at System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
Boolean breakConnection )
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection )
at
System.Data.Sq lClient.TdsPars er.ThrowExcepti onAndWarning(Td sParserStateObj ect
stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandle r, TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
RunBehavior runBehavior, String resetOptionsStr ing)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method,
DbAsyncResul t result)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result, String methodName, Boolean sendToPipe)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
G:\_CMS\CMS041 62007\Client.vb :line 767"

Why could it happen? All Select SPs are working fine. I'm using the same
connection object (of cource with different connection string).

Any help please

vovan

Can you run the sproc from enterprise manager or query analyzer? You
might also check the event logs on the server to see if it gives a
better description of the error.

Thanks,

Seth Rowe

Apr 16 '07 #3
One of the fields in the updatable table is varchar(8000). After I made it
smaller (varchar(4000)) everything works.
I think this is relater to SQL Server settings. So on one server that size
doesn't affect the package while on another server it does affect.
Either I need to find out what setting is responsible for the package size
or just keep the size of the column small enough.

vovan

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
On Apr 16, 10:26 am, "vovan" <some...@vovan. comwrote:
>I'm trying to run SQL Server Stored Procedure to update a single record
in
DB from VB 2005 application.
I'm using 2 testing SQL Servers. With the first one there is no problem.
I
detached the database from the first server and attached it to the second
one. With the second server I get an error:
"System.Data.S qlClient.SqlExc eption: A severe error occurred on the
current
command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any,
should
be discarded.
at System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
Boolean breakConnection )
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection )
at
System.Data.Sq lClient.TdsPars er.ThrowExcepti onAndWarning(Td sParserStateObj ect
stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandle r, TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
RunBehavior runBehavior, String resetOptionsStr ing)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method,
DbAsyncResul t result)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result, String methodName, Boolean sendToPipe)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
G:\_CMS\CMS041 62007\Client.vb :line 767"

Why could it happen? All Select SPs are working fine. I'm using the same
connection object (of cource with different connection string).

Any help please

vovan

Can you run the sproc from enterprise manager or query analyzer? You
might also check the event logs on the server to see if it gives a
better description of the error.

Thanks,

Seth Rowe

Apr 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1193
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select database(); +------------+ | database() | +------------+
3
2751
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command that I can use instead? Cheers Nicolaas
0
5006
by: Rhon Stewart via DotNetMonster.com | last post by:
Hi please visit this link : http://www.eggheadcafe.com/articles/pfc/selfupdater.asp I followed all the steps for listed on the link , when I execute the application it it gives me the following error on the log file: --- ApplicationUpdateManager.StartUpdater] : The Updater has started; the target application's name is 'SayHello'. Time started: 2005_03_01_14:33:21.
11
1362
by: perspolis | last post by:
hi all When I update my dataset it gives me an error which follows "Concurrecny failed, 0 record affected" I don't know why??..I don't do anything that raise this error.. just when user press Save button I call Update mehtod of my SqlDataAdaptor..
1
1593
by: Jeremy Ames | last post by:
I have a datagrid that updates the table using a stored procedure. The stored procedure is confirmed to complete correctly, yet the sql data adapter is returning an error that my application is catching. Everything within my stored procedure is contained within a transaction. When utilizing the sql profiler, we can see that the transaction successfully begins and commits. The data in the sql table is updated at this point. My data...
3
3127
by: Jerry | last post by:
Well, here is some weirdness. First, I noticed that I have 2 Set keywords (silly me). so I removed the 2nd "Set" but still got a syntax error. Then I removed the Where clause, and now it works perfectly. Is this correct? Or am I just getting lucky? I'm not completely clear on the fundamentals here. I update the table in my dataset, then I update the table on the server through the dataAdapter. I think I have a handle on the...
19
8387
by: Steve | last post by:
ASP error number 13 - Type mismatch with SELECT...FOR UPDATE statement I got ASP error number 13 when I use the SELECT...FOR UPDATE statement as below. However, if I use SELECT statement without FOR UPDATE, it is fine and no error. I also tried Set objRs = objConn.Execute("SELECT * FROM EMP UPDATE OF EMPNO"), but it still couldn't help. any ideas? I tried to search in the web but couldn't find similar
7
12186
by: Mathew Butler | last post by:
I'm investigating an issue I have when pulling data back from MS access I'm retrieving all rows from a column in a table of 5000 rows - accessing a column of type "memo" ( can be 65353 character long) . I'm pulling the data back using ODBC. Details are: Microsoft Access Driver 4.00.6306.00 Jet 4.0 release level that is currently installed (Msjet40.dll ) "Microsoft Jet Engine Library" 4.0.9025.0 After 291 rows are retreived I am...
2
2759
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string>
7
7797
by: Jan | last post by:
Hi: When I searched the newsgroup for this problem, I saw two or three instances of the question being asked, but it was never answered. Not too promising, but here goes: I have a form with four subforms, and bit of code that cycles through the data in the subform (bound to a local temp table) and writes it to a table on the server. This code has run at the client with no problems for over a year.
0
9575
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10320
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10308
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10073
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.