Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Thursday, March 8, 2012

"Resource is low, some results are dropped"

I've been getting this message in a dialog box intermittently. Most recently
when trying to execute 'select @.@.trancount' after a statement attempted to
insert 100 rows into a table with only 10 rather small, varchar(256) columns
Everything that turned up on a Google search basically said throw more
hardware at it. I'd like to know what the underlying issue is. I'm on a 3ghz
pentium 4 with 1 gig of ram. Task Manager shows total Physical Memory(K) of
1039304, available memory = 333208(K) and System Cache = 507972 along with
2% CPU so I don't believe that it's a memory issue or more hardware will
solve the underlying issue.
Does anyone have an answer for this other than throw more hardware at it?
Where do you see this error? Query Analyzer?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
news:DB948FD8-DF27-4EC3-AA40-59F9718318FB@.microsoft.com...
> I've been getting this message in a dialog box intermittently. Most recently
> when trying to execute 'select @.@.trancount' after a statement attempted to
> insert 100 rows into a table with only 10 rather small, varchar(256) columns
> Everything that turned up on a Google search basically said throw more
> hardware at it. I'd like to know what the underlying issue is. I'm on a 3ghz
> pentium 4 with 1 gig of ram. Task Manager shows total Physical Memory(K) of
> 1039304, available memory = 333208(K) and System Cache = 507972 along with
> 2% CPU so I don't believe that it's a memory issue or more hardware will
> solve the underlying issue.
> Does anyone have an answer for this other than throw more hardware at it?
|||Hi,
Looks like you are executing the query in GRID result pane in query
analyzer. Could you change the mode to Text and try.
How to change:-
1. In query analyzer
2. Go to Query menu
3. Select "Result in Text"
4. Execute the query.
Thanks
Hari
SQL Server MVP
"Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
news:DB948FD8-DF27-4EC3-AA40-59F9718318FB@.microsoft.com...
> I've been getting this message in a dialog box intermittently. Most
> recently
> when trying to execute 'select @.@.trancount' after a statement attempted to
> insert 100 rows into a table with only 10 rather small, varchar(256)
> columns
> Everything that turned up on a Google search basically said throw more
> hardware at it. I'd like to know what the underlying issue is. I'm on a
> 3ghz
> pentium 4 with 1 gig of ram. Task Manager shows total Physical Memory(K)
> of
> 1039304, available memory = 333208(K) and System Cache = 507972 along
> with
> 2% CPU so I don't believe that it's a memory issue or more hardware will
> solve the underlying issue.
> Does anyone have an answer for this other than throw more hardware at it?
|||Or use the shortcuts CTRL + T for text mode, CTRL + D for grid
http://sqlservercode.blogspot.com/
"Hari Prasad" wrote:

> Hi,
> Looks like you are executing the query in GRID result pane in query
> analyzer. Could you change the mode to Text and try.
>
> How to change:-
> 1. In query analyzer
> 2. Go to Query menu
> 3. Select "Result in Text"
> 4. Execute the query.
> Thanks
> Hari
> SQL Server MVP
>
>
> "Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
> news:DB948FD8-DF27-4EC3-AA40-59F9718318FB@.microsoft.com...
>
>
|||re: Resource is low, some results are dropped
There are a few different reasons this could happen.
1) Not patched up! Make sure you have the latest patches from Microsoft.
Service Packs
http://www.microsoft.com/sql/downloads/2000/sp4.mspx
Security Patches
You can check Technet for the latest patches...
http://www.microsoft.com/technet/security/current.aspx
2) How, and how many, results are returned.
Query Analyzer returns results in one of two ways when you execute SQL Statements (Text or Grid) It can execute and return the most complicated queries from huge databases with large result sets.
However, it has a problem returning multiple results to grid. Each grid requires a certain amount of resources, and if you execute a large number of queries, it eventually will run out memory and drop some results.
I was looping throogh sysobjects and syscolumns, executing a select statement on every column for every table. (Code GEnerator) It was trying to open a grid for every column in my database. Not that Pubs or Northwind would cause it, but my production da
tabase had a lot more objects. My guess is that this requires too many resources to complete.
If I changed the output for executing the queries to text mode, or I printed the information to the screen instead of executing t-SQL I did not get the error.
Try running it in text mode. Menu Bar - Query - Results in grid or Results in Text.
The keyboard shortcuts are Ctrl+D for Grid and Ctrl+T for Text.
Mike Pittser
Database Architect
sql2k5dba@.yahoo.com
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Sunday, February 19, 2012

"Invalid Character value for cast specification" from VC++ when i execute a proc

Hi Everybody,

I have a question regarding the running of a procedure from VC++ in SQL server.

well this is the scenario.

i have a procedure in SQL server and i am running that thru my VC++ code.
:eek:
i have a recordset class and i create an object of it and then do a obj.Open(). the procedure is fetching 24 records correctly in the query analyser and in my while(!(obj.IsEOF())) loop it gets the first record correctly but the moment it encounters obj.MoveNext(); it bombs and gives me the following error..

"Invalid Character value for cast specification ".

i don't know why this is happening

Thanks for you help.Somewhere in your Transact-SQL code you are trying to convert a character value to another datatype. My first guess would be DATETIME, next might be INT or another numeric datatype. This is usually either in a column you are returning or in a WHERE clause, but it can happen anywhere you can refer to a column.

-PatP|||BTW, since this actually appears to be a Transact-SQL problem, I'm moving the thread back to the Microsoft SQL forum.

-PatP

"INSTEAD OF" Triggers don't seem to work (maybe I misunderstand?)

SQL Server documentation (BOL) states that an "instead of" trigger represent
s
code
that will execute instead of the action requested by the statement that
caused the
trigger to fire. For example, in the case of an "instead of update"
trigger, the
update statment which caused the trigger to fire, would be prevented from
updating the table, simply by virtue of the fact that an "instead of update"
trigger exists. Am I understanding this correctly?
I have an "instead of update trigger" which does not prevent the update
unless I explicitly do a ROLLBACK TRAN. Is this the expected behavior?
TIA,
R. AldersonAn Instead Of trigger should prevent the update. Can you post your code?
Try the following:
Set Nocount on
use pubs
go
Create Table foo (foovalue int)
go
Create Trigger trFoo on foo
Instead Of Update As
Select 'trFoo trigger Fired'
go
Insert Into foo (foovalue) values (1)
Select * from foo
Update foo Set foovalue = 2
Select * from foo
Drop Table foo
Your result should be :
foovalue
--
1
trFoo trigger Fired
foovalue
--
1
showing that the update of foovalue to 2 did not take place.
Tom
"rca" <rca@.discussions.microsoft.com> wrote in message
news:3C9E59C2-8BCB-4A86-A3FA-F2ED58014214@.microsoft.com...
> SQL Server documentation (BOL) states that an "instead of" trigger
> represents
> code
> that will execute instead of the action requested by the statement that
> caused the
> trigger to fire. For example, in the case of an "instead of update"
> trigger, the
> update statment which caused the trigger to fire, would be prevented from
> updating the table, simply by virtue of the fact that an "instead of
> update"
> trigger exists. Am I understanding this correctly?
> I have an "instead of update trigger" which does not prevent the update
> unless I explicitly do a ROLLBACK TRAN. Is this the expected behavior?
> TIA,
> R. Alderson