CLR Stored Procedure And Stack Trace Line Numbers

Sep 27, 2007

Hello you all CLR stored procedure experts,

When a self-developed CLR stored procedure throws an Exception and the Exception is caught in the code and for example logged, there only are class and method names in the stack trace lines, but not the line numbers. Can the line numbers somehow be included in the stack trace?

I'm not familiar with .NET framework stack traces, but when I tried to find out more information I hit concepts like PDB files, are such things somehow needed to enable line numbers in stack traces?

Big thanks already in advance,
J

View 2 Replies


ADVERTISEMENT

Can A Stored Procedure Be Viewed With Trace?

Apr 16, 2004

Ok this should be easy but I haven't found an aswer.

I have a stored procedure in a SQL Server database I use it to add new records to a table. I assign values to parameters and ExecuteNonQuery();

I'm getting an error input string invalid. I'm sure its due to null values which I can troubleshoot on my own.

I know how to view the contents of an inline sql statement in classic ASP such as mySQL = "Select authors from pubs" and then Response.Write mySQL. But how do I do this for a stored procedure in .NET?

Tracing for the page is on. I've tried Trace.Write (sqlCommand1.CommandText); but I don't see the command text.

What am I missing?

View 1 Replies View Related

SQL Server Stored Procedure Trace

Jan 18, 2006

Hello,
I am using a component (infragistics netadvantage) within my application which uses a default database.  Unfortunately this database doesn't provide me with all the functionality I need. Since the component uses stored procedures.
Is there anyway I can see what stored procedures are called when an event occurs?
That way I can copy over the tables and the stored procedures I need and I can alter them to suit my database.

View 3 Replies View Related

Using A Trace To Identify Which Row Errored In Stored Procedure

Sep 25, 2007

I am currently invoking a €śtrace€? using TSQL statements to debug problems with our billing stored procedures under SQL Server 2005.

It has been asked that if the billing failed due to some exception €“ could the trace be used to identify which row caused the error.

I have not found anything in the trace table that would assist me in this. I thought the €śreads€? and €śwrites€? posted in the trace table would help €“ but they are only posted at successful completion of a sql statement.

Does anyone have any ideas how I can obtain this information using TSQL trace statements?

View 6 Replies View Related

Line Numbers.

Oct 24, 2007

How to enable “line number� display in query editor (SSMS)?


------------------------
I think, therefore I am - Rene Descartes

View 3 Replies View Related

EXEC Stored Procedure For Every Line Of SELECT Result Table - How?

Jul 23, 2005

Hello,Is it possible to EXEC stored procedure from a query?I want to execute stored procedure for every line of SELECT resulttable.I guess it's possible with cursors, but maybe it's possible to make iteasier.Give an example, please.Thank you in advance.Hubert

View 2 Replies View Related

How To Execute Stored Procedure By Command Line In Client's Computer ?

Nov 28, 2006

I've a S.P. that need to execute in local PC, how can I execute ?

View 1 Replies View Related

Adding Line Sequence Numbers

Jun 25, 2007

hi all

I am stuck with something that seems easy but im obviously clueless as how to execute the idea.

I have a custom table that houses invoices on the details level. So for example i have:

InvcNo
00000001
00000001
00000001
00000002
00000002
00000003

and so forth

What I am wanting to do in another column is keep track of the sequence number for each distinct invoice like:

SeqNo
1
2
3
1
2
1

I am working in a stored proc and i cant get past adding the numbers up at each line as a whole and not reseting when the next invoice number is present. Any help would be so greatly appreciated.

Thanks

View 10 Replies View Related

Line Numbers In Report Builder

Nov 10, 2005

I have a report in which the user community would like line numbers associated with each row.  Has anyone done this or have any ideas how to accomplish this?

View 8 Replies View Related

SQL Server 2012 :: Displaying Code Of A Stored Procedure To A Single Line

Sep 14, 2015

Any better way to query SQL 2012 to display the code of a stored proc to a single line. I'm trying to write a script to insert the contents of the procs between my devestprod environments. So people can query a single table for any proc that is different between environments. At the moment I am using the syscomments view and the text column but the problem here is if you get a lengthy proc it cuts it up into multiple rows.

I can get around it by converting the text to a varchar(max) and outer joining the query, but as you can see by my code below I have to try and guess what the maximum number of rows I'm going to get back for my largest proc. If someone adds a new one that returns 8 rows I'm going to miss it with this query.

Select col1.[type],col1.[name],convert(varchar(max),col1.text) + isnull(convert(varchar(max),col2.Text),'')
+ isnull(convert(varchar(max),col3.Text),'')
+ isnull(convert(varchar(max),col4.Text),'')
+ isnull(convert(varchar(max),col5.Text),'')
+ isnull(convert(varchar(max),col6.Text),'')
+ isnull(convert(varchar(max),col7.Text),'')

[Code] .....

View 3 Replies View Related

The Zero Line Seperating Postive And Negative Numbers Should Be Darker

Aug 14, 2007



Hi,
I am having chart which has positive and negative numbers.I need dark line(gridline) at 0.00th location.So that it differentiates between positive and negative levels.So please help me out in solving this asap.

Thanks in Advance
Shri

View 4 Replies View Related

Generating Sequenced Line Numbers For Each Invoice Number

May 8, 2008

Can you help me with SQL issue I€™m stuck on?
I wish to take source data that looks like this:





Invoic_num

Line_num








6658

0








6658

2








6658

8








7721

2








7721

3







And rebuild the line numbers like this:





Invoic_num

Line_num








6658

1








6658

2








6658

3








7721

1








7721

2







This seems completely impossible to me. So I was thinking that maybe a second procedure using update could be run against the table after the initial build.

View 10 Replies View Related

SQL 2005 Management Studio: Line Numbers In Query Window.

Dec 19, 2005

Can anyone tell me if you can display line numbers in the query windowof SQL 2005 Management Studio and if so how do I go about doing it?Thanks a bunch. TFD

View 2 Replies View Related

How To Monitor Store Procedure (Line By Line)

Sep 29, 2001

HEllo can anybody tell me how to monitor a long store procedure
line by line. Also how to put progress bar in it to tell user how
much is done.

Sabih.

View 1 Replies View Related

Dataflow To Excel - Convert Numbers Stored As Text To Numbers Excel Cell Error

Mar 27, 2007

I'm trying to write data to excel from an ssis component to a excel destination.

Even thought I'm writing numerics, every cell gets this error with a green tag:

Convert numbers stored as text to numbers

Excel Cells were all pre-formated to accounting 2 decimal, and if i manually type the exact data Im sending it formats just fine.

I'm hearing this a common problem -

On another project I was able to find a workaround for the web based version of excel, by writing this to the top of the file:

<style>.text { mso-number-format:@; } </style>

is there anything I can pre-set in excel (cells are already formated) or write to my file so that numerics are seen as numerics and not text.

Maybe some setting in my write drivers - using sql servers excel destination.


So close.. Thanks for any help or information.

View 1 Replies View Related

Trace Changes To Stored Procedures

Nov 25, 2004

Hi all,

Is there a way to trace changes made to stored procedures, but not only trace wether a SP is changed or not, but also who did it, and if possible what kind of change it was.

I was looking at the sp_trace_* procedures, but except for the checking of a possible recompilation of a SP, there are no other events available that trace changes in an SP.

Any suggestions ? Thx in advance,

Dirk.

View 2 Replies View Related

Formatting Numbers In A Mixed Column (numbers In Some Cells Strings In Other Cells) In Excel As Numbers

Feb 1, 2007

I have a report with a column which contains either a string such as "N/A" or a number such as 12. A user exports the report to Excel. In Excel the numbers are formatted as text.

I already tried to set the value as CDbl which returns error for the cells containing a string.

The requirement is to export the column to Excel with the numbers formatted as numbers and the strings such as "N/A' in the same column as string.

Any suggestions?



View 1 Replies View Related

Can You Trace Into A Stored Proc? Also Does RAISERROR Terminate The Stored Proc Execution.

Feb 13, 2008

I am working with a large application and am trying to track down a bug. I believe an error that occurs in the stored procedure isbubbling back up to the application and is causing the application not to run. Don't ask why, but we do not have some of the sourcecode that was used to build the application, so I am not able to trace into the code.
So basically I want to examine the stored procedure. If I run the stored procedure through Query Analyzer, I get the following error message:
Msg 2758, Level 16, State 1, Procedure GetPortalSettings, Line 74RAISERROR could not locate entry for error 60002 in sysmessages.
(1 row(s) affected)
(1 row(s) affected)
I don't know if the error message is sufficient enough to cause the application from not running? Does anyone know? If the RAISERROR occursmdiway through the stored procedure, does the stored procedure terminate execution?
Also, Is there a way to trace into a stored procedure through Query Analyzer?
-------------------------------------------As a side note, below is a small portion of my stored proc where the error is being raised:
SELECT  @PortalPermissionValue = isnull(max(PermissionValue),0)FROM Permission, PermissionType, #GroupsWHERE Permission.ResourceId = @PortalIdAND  Permission.PartyId = #Groups.PartyIdAND Permission.PermissionTypeId = PermissionType.PermissionTypeId
IF @PortalPermissionValue = 0BEGIN RAISERROR (60002, 16, 1) return -3END 
 

View 3 Replies View Related

Calling A Stored Procedure Inside Another Stored Procedure (or Nested Stored Procedures)

Nov 1, 2007

Hi all - I'm trying to optimized my stored procedures to be a bit easier to maintain, and am sure this is possible, not am very unclear on the syntax to doing this correctly.  For example, I have a simple stored procedure that takes a string as a parameter, and returns its resolved index that corresponds to a record in my database. ie
exec dbo.DeriveStatusID 'Created'
returns an int value as 1
(performed by "SELECT statusID FROM statusList WHERE statusName= 'Created') 
but I also have a second stored procedure that needs to make reference to this procedure first, in order to resolve an id - ie:
exec dbo.AddProduct_Insert 'widget1'
which currently performs:SET @statusID = (SELECT statusID FROM statusList WHERE statusName='Created')INSERT INTO Products (productname, statusID) VALUES (''widget1', @statusID)
I want to simply the insert to perform (in one sproc):
SET @statusID = EXEC deriveStatusID ('Created')INSERT INTO Products (productname, statusID) VALUES (''widget1', @statusID)
This works fine if I call this stored procedure in code first, then pass it to the second stored procedure, but NOT if it is reference in the second stored procedure directly (I end up with an empty value for @statusID in this example).
My actual "Insert" stored procedures are far more complicated, but I am working towards lightening the business logic in my application ( it shouldn't have to pre-vet the data prior to executing a valid insert). 
Hopefully this makes some sense - it doesn't seem right to me that this is impossible, and am fairly sure I'm just missing some simple syntax - can anyone assist?
 

View 1 Replies View Related

Sorting Numbers Stored As Varchar

Mar 19, 2008

Hi All,

I have a field in a table that is varchar. The field can contain numbers or alpha characters. I have a view against this table and I am trying to sort on the output of this field and am running into some problems.

I am trying to use 'isnumeric' to determine if the field contains numbers and if so, then I am using 'convert' to change it to an integer so I can sort it properly. I am using a CASE statement but I am encountering a conversion error on the alpha characters. I am new to SQL and my syntax may be wrong.

Can anyone help please?

SELECT TOP 100 PERCENT SpaceName, CASE WHEN isnumeric(RoomTable.RoomNumber) <> 0 THEN CONVERT(int, RoomTable.RoomNumber)
ELSE RoomTable.RoomNumber END RoomNumber
FROM dbo.RoomTable
ORDER BY SpaceName, RoomNumber

View 5 Replies View Related

Calling A Stored Procedure From ADO.NET 2.0-VB 2005 Express: Working With SELECT Statements In The Stored Procedure-4 Errors?

Mar 3, 2008

Hi all,

I have 2 sets of sql code in my SQL Server Management Stidio Express (SSMSE):

(1) /////--spTopSixAnalytes.sql--///

USE ssmsExpressDB

GO

CREATE Procedure [dbo].[spTopSixAnalytes]

AS

SET ROWCOUNT 6

SELECT Labtests.Result AS TopSixAnalytes, LabTests.Unit, LabTests.AnalyteName

FROM LabTests

ORDER BY LabTests.Result DESC

GO


(2) /////--spTopSixAnalytesEXEC.sql--//////////////


USE ssmsExpressDB

GO
EXEC spTopSixAnalytes
GO

I executed them and got the following results in SSMSE:
TopSixAnalytes Unit AnalyteName
1 222.10 ug/Kg Acetone
2 220.30 ug/Kg Acetone
3 211.90 ug/Kg Acetone
4 140.30 ug/L Acetone
5 120.70 ug/L Acetone
6 90.70 ug/L Acetone
/////////////////////////////////////////////////////////////////////////////////////////////
Now, I try to use this Stored Procedure in my ADO.NET-VB 2005 Express programming:
//////////////////--spTopSixAnalytes.vb--///////////

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim sqlConnection As SqlConnection = New SqlConnection("Data Source = .SQLEXPRESS; Integrated Security = SSPI; Initial Catalog = ssmsExpressDB;")

Dim sqlDataAdapter As SqlDataAdapter = New SqlDataAdaptor("[spTopSixAnalytes]", sqlConnection)

sqlDataAdapter.SelectCommand.Command.Type = CommandType.StoredProcedure

'Pass the name of the DataSet through the overloaded contructor

'of the DataSet class.

Dim dataSet As DataSet ("ssmsExpressDB")

sqlConnection.Open()

sqlDataAdapter.Fill(DataSet)

sqlConnection.Close()

End Sub

End Class
///////////////////////////////////////////////////////////////////////////////////////////

I executed the above code and I got the following 4 errors:
Error #1: Type 'SqlConnection' is not defined (in Form1.vb)
Error #2: Type 'SqlDataAdapter' is not defined (in Form1.vb)
Error #3: Array bounds cannot appear in type specifiers (in Form1.vb)
Error #4: 'DataSet' is not a type and cannot be used as an expression (in Form1)

Please help and advise.

Thanks in advance,
Scott Chang

More Information for you to know:
I have the "ssmsExpressDB" database in the Database Expolorer of VB 2005 Express. But I do not know how to get the SqlConnection and the SqlDataAdapter into the Form1. I do not know how to get the Fill Method implemented properly.
I try to learn "Working with SELECT Statement in a Stored Procedure" for printing the 6 rows that are selected - they are not parameterized.




View 11 Replies View Related

Stack Dump

Apr 26, 2007

Hi;

I am frequently seeing the below errors in our SQL 7 Server running on Windows NT. I need your help to analze the problem. Thanks.

nitconfig: Number of user connections limited to 32767.

Module(sqlservr+e4c0) (CMsqlExecContext::Execute+1bb)

Module(sqlservr+e9ab) (CMsqlExecContext::ExecuteStmts+11b)

Module(sqlservr+1ce59) (CStmtSelect::XretExecute+1f8)

Module(sqlservr+10d22) (CStmtQuery::FExecuteQuery+1df)

Module(sqlservr+11f86) (CQuery::Execute+4f)

Module(sqlservr+120f5) (CQueryScan::CQueryScan+22c)

Module(sqlservr+12336) (CQueryScan::InitLockClasses+c3)

Module(sqlservr+12373) (CTableIsolation::FNeedLockClass+14)

Short Stack Dump

******************************************************************************
*
* BEGIN STACK DUMP:
* 04/25/07 08:32:19 spid 22
*
* Exception Address = 00412373 (CTableIsolation::FNeedLockClass + 14)
* Exception Code = c0000005 E
* Access Violation occurred reading address 00000014
* Input Buffer 132 bytes -
* S E L E C T S u p F r o m , S u p T o F R O M S u p p o r t P r
* o f i l e s w h e r e S u p P r o f i l e = 3 0 4 5
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 008d2fff 004d3000
* ntdll 77f60000 77fbefff 0005f000
* KERNEL32 77f00000 77f5efff 0005f000
* ADVAPI32 77dc0000 77dfefff 0003f000
* USER32 77e70000 77ec1fff 00052000
* GDI32 78140000 78174fff 00035000
* RPCRT4 77e10000 77e66fff 00057000
* ole32 77b20000 77bd0fff 000b1000
* OLEAUT32 65340000 653dafff 0009b000
* VERSION 77a90000 77a9afff 0000b000
* SHELL32 77c40000 77d7afff 0013b000
* COMCTL32 71710000 71793fff 00084000
* LZ32 779c0000 779c7fff 00008000
* opends60 41060000 41085fff 00026000
* ums 41090000 4109cfff 0000d000
* MSVCRT 78000000 78045fff 00046000
* sqlsort 04000000 0408efff 0008f000
* MSVCIRT 780a0000 780b1fff 00012000
* sqlevn70 410a0000 410a6fff 00007000
* rpcltc1 77bf0000 77bf6fff 00007000
* COMNEVNT 410b0000 410fefff 0004f000
* ODBC32 1f7d0000 1f803fff 00034000
* comdlg32 77d80000 77db1fff 00032000
* SQLWOA 41100000 4110bfff 0000c000
* odbcint 1f8c0000 1f8d5fff 00016000
* NDDEAPI 75a80000 75a86fff 00007000
* WINSPOOL 77c00000 77c17fff 00018000
* SQLTrace 41130000 4117dfff 0004e000
* NETAPI32 4ca00000 4ca40fff 00041000
* NETRAP 77840000 77848fff 00009000
* SAMLIB 777e0000 777ecfff 0000d000
* WSOCK32 776d0000 776d7fff 00008000
* WS2_32 776b0000 776c3fff 00014000
* WS2HELP 776a0000 776a6fff 00007000
* WLDAP32 77950000 77978fff 00029000
* SQLFTQRY 41020000 4103afff 0001b000
* SSNMPN70 41190000 41195fff 00006000
* SSMSSO70 411a0000 411aafff 0000b000
* SSMSRP70 411b0000 411b7fff 00008000
* ENUDTC 74e20000 74e36fff 00017000
* XOLEHLP 74e40000 74e48fff 00009000
* MTXCLU 74e50000 74e5cfff 0000d000
* ADME 74e60000 74e72fff 00013000
* DTCUtil 74e80000 74e89fff 0000a000
* DTCTRACE 74e90000 74e96fff 00007000
* CLUSAPI 7f230000 7f23cfff 0000d000
* RESUTILS 7f250000 7f259fff 0000a000
* MSDTCPRX 74ea0000 74ed0fff 00031000
* DTCCM 74ee0000 74efdfff 0001e000
* msafd 77660000 7766efff 0000f000
* wshtcpip 77690000 77698fff 00009000
* rpclts1 77e00000 77e05fff 00006000
* RpcLtScm 755b0000 755bafff 0000b000
* MSWSOCK 77670000 77684fff 00015000
* rnr20 75600000 7560dfff 0000e000
* RpcLtCcm 756d0000 756defff 0000f000
* security 76e70000 76e81fff 00012000
* msapsspc 756e0000 756f3fff 00014000
* MSVCRT40 779d0000 779e4fff 00015000
* schannel 77400000 7741dfff 0001e000
* MSOSS 75710000 75734fff 00025000
* CRYPT32 75740000 757b4fff 00075000
* MSASN1 757c0000 757cffff 00010000
* msnsspc 757d0000 757eefff 0001f000
* digest 757f0000 757fffff 00010000
* SQLRGSTR 01b60000 01b64fff 00005000
* xpsqlbot 01bf0000 01bf5fff 00006000
* sqlboot 01c00000 01c07fff 00008000
* EntApi 0a000000 0a011fff 00012000
* PSAPI 76bf0000 76bfafff 0000b000
* WININET 01db0000 01e45fff 00096000
* SHLWAPI 01e50000 01eb8fff 00069000
* xpstar 02440000 02470fff 00031000
* SQLWID 02480000 02485fff 00006000
* SQLSVC 02490000 024a8fff 00019000
* odbcbcp 024b0000 024b5fff 00006000
* SQLRESLD 024c0000 024c5fff 00006000
* W95SCM 024d0000 024d7fff 00008000
* SQLSVC 024e0000 024e5fff 00006000
* sqlimage 02590000 025bcfff 0002d000
*
* Edi: 00100C70: 000a0100 00030008 00000000 00000000 00100e70 00100e50
* Esi: 00000000:
* Eax: 00000000:
* Ebx: 00000004:
* Ecx: 00000000:
* Edx: 00000004:
* Eip: 00412373: 007ea6e2 05f61577 01f88318 468b0013 d49f850f 00147e83
* Ebp: 01C8F864: 00000001 00000000 2149a1e4 00000000 00412336 01c8f898
* SegCs: 0000001B:
* EFlags: 00010246: 003d0052 00490044 005f004c 00410043 004f004c 005f0053
* Esp: 01C8F854: 00412336 01c8f898 00000000 00000004 2149a1e4 00000000
* SegSs: 00000023:
*******************************************************************************

SqlDumpExceptionHandler: Process 22 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

Using 'sqlimage.dll' version '4.0.5'
Stack Dump being sent to C:MSSQL7logSQL00026.dmp

Sunrise406, creation date and time: 2001/11/16(14:34:00), first LSN: 647599:6555:1, last LSN: 647633:8427:1, striped: 0, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'D:MSSQL7BACKUPSunrise406_tlog_200704250000.TRN'}).

Using 'xpstar.dll' version '2000.28.09' to execute extended stored procedure 'xp_regread'.

Database backed up with following information: Database: Sunrise406, creation date and time: 2001/11/16(14:34:00), pages dumped: 47456, first LSN: 647633:8425:1, last LSN: 647633:8427:1, sort order: 52, striped: 0, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'D:MSSQL7ackupSunriseDailyBackup9pm'}).

View 5 Replies View Related

How To Build A Procedure That Returns Different Numbers Of Columns As A Result Based On A Parameter

Nov 23, 2006

/*Subject: How to build a procedure that returns differentnumbers of columns as a result based on a parameter.You can copy/paste this whole post in SQL Query Analyzeror Management Studio and run it once you've made surethere is no harmful code.Currently we have several stored procedures which finalresult is a select with several joins that returns manycolumns (150 in one case, maybe around 50 the average).We have analyzed our application and found out that mostof the time not all the columns are used. We haveidentified 3 different sets of columns needed indifferent parts of the application.Let's identify and name these sets as:1- simple set, return the employee list for example2- common set, return the employee information (whichinclude the simple set)3- extended set, return the employee information (whichinlude the common set which itself includes the simpleset) + additional information from other tables, maybeeven some SUM aggregates and so on (I don't know forexample, how much sales the employee did so far).So the bigger sets contain the smaller ones. Please keepreading all the way to the bottom to better understandtechnically what we are trying.Here is a code sample of how our current procedureswork. Please note that the passing parameter we can eitherpass a Unique Identifier (PK) to retrieve a single record,or if we pass for example -1 or NULL we retrieve all theemployee records.*/create table a ( apk int primary key, af1 int, af2 int, af3 int, af4int, af5 int, af6 int)create table b ( bpk int primary key, bf1 int, bf2 int, bf3 int, bf4int, bf5 int, bf6 int)create table c ( cpk int primary key, cf1 int, cf2 int, cf3 int, cf4int, cf5 int, cf6 int)create table d ( dpk int primary key, df1 int, df2 int, df3 int, df4int, df5 int, df6 int)insert a values (1,1111,1112,1113,1114,1115,1116)insert a values (2,1211,1212,1213,1214,1215,1216)insert a values (3,1311,1312,1313,1314,1315,1316)insert a values (4,1411,1412,1413,1431,1415,1416)insert a values (5,1511,1512,1513,1514,1515,1516)insert a values (6,1611,1612,1613,1614,1615,1616)insert b values (1,2111,2112,2113,2114,2115,2116)insert b values (2,2211,2212,2213,2214,2215,2216)insert b values (3,2311,2312,2313,2314,2315,2316)insert b values (4,2411,2412,2413,2431,2415,2416)insert b values (5,2511,2512,2513,2514,2515,2516)insert b values (6,2611,2612,2613,2614,2615,2616)insert c values (1,3111,3112,3113,3114,3115,3116)insert c values (2,3211,3212,3213,3214,3215,3216)insert c values (3,3311,3312,3313,3314,3315,3316)insert c values (4,3411,3412,3413,3431,3415,3416)insert c values (5,3511,3512,3513,3514,3515,3516)insert c values (6,3611,3612,3613,3614,3615,3616)insert d values (1,4111,4112,4113,4114,4115,4116)insert d values (2,4211,4212,4213,4214,4215,4216)insert d values (3,4311,4312,4313,4314,4315,4316)insert d values (4,4411,4412,4413,4431,4415,4416)insert d values (5,4511,4512,4513,4514,4515,4516)insert d values (6,4611,4612,4613,4614,4615,4616)gocreate procedure original_proc @pk int asif @pk = -1set @pk = nullselecta.af1, a.af2, a.af3, a.af4, b.bf1, b.bf2, b.bf3, b.bf4, c.cf1, c.cf2,c.cf3, c.cf4, d.df1, d.df2, d.df3, d.df4fromajoin b on a.apk = b.bpkjoin c on b.bpk = c.cpkjoin d on c.cpk = d.dpkwherea.apk = ISNULL(@pk, a.apk)goexec original_proc 1go/*Currently the above SP is a single SP that is basicallyreturning ALL possible needed data. However most of thetime we might need to call and retrieve a simple employeelist.So we thought about modifying the stored procedure byadding an extra parameter that will indicate which setof columns to return.For modifying the stored procedure in order to get avariable name of columns returned and avoidingrepeating code, we built 4 objects: the storedprocedure being called, one table function and 2 views.One table function so that we are able to pass a parameter.The views since they do not accept parameters they arealways joined at least with the inline table function.The stored procedure generates in its body a dynamicSQL statement, where it queries the table function andthe views, depending which set is required. Here is acode sample of our current design (you need to run theprevious code in order for this to work).*/create function _1_set(@pk int)returns tableas return(select a.apk, a.af1, a.af2, a.af3, a.af4, b.bf1, b.bf2from ajoin b on a.apk = b.bpkwhere a.apk = ISNULL(@pk, a.apk))gocreate view _2_set asselect b.bpk, b.bf3, b.bf4, c.cf1, c.cf2from bjoin c on b.bpk = c.cpkgocreate view _3_set asselect c.cpk, c.cf3, c.cf4, d.df1, d.df2, d.df3, d.df4from cjoin d on c.cpk = d.dpkgocreate procedure new_proc @pk int, @set int asdeclare @sql nvarchar(4000)if @pk = -1set @pk = nullset @sql = 'select * from _1_set(@pk) fs 'if @set 1set @sql = @sql + 'join _2_set ss on fs.apk = ss.bpk 'if @set 2set @sql = @sql + 'join _3_set ts on ss.bpk = ts.cpk 'exec sp_executesql @sql, N'@pk int', @pkgoexec new_proc 1, 3go/*For executing the new procedure, we pass parameter 1for the smaller set, 2 for the medium size set or 3for the complete set.For example when we want to retrieve the common setwe pass the Unique Identifier of the employee to theSP and then we pass the type of set we want to useas the second parameter (1 for simple set, 2 forcommon set and 3 for extended set).The SP has the IF and dynamic SQL to add more JOINs.We would like to know what you think of this approachand if you know a simpler way of doing it.For cleaning up the test objects run the following code.*/drop procedure original_procdrop procedure new_procdrop function _1_setdrop view _2_setdrop view _3_setdrop table adrop table bdrop table cdrop table dAs always I would appreciate any feedback, opinion,comments, ideas and suggestions.Thank you

View 9 Replies View Related

Deleting Leading 0's In Numbers Stored In A Text Field.

Jul 25, 2006

I am trying to use several tables that have one 10-character text field in
common. Most of the records have a numeric expression, but some tables have leading
0's, and some don't.
I can't cast the field to numbers because there are some records that have
letters also.
What function can I use to get rid of all the 0s at the left of each record?
(Sort of a LTRIM function that gets rid of 0s instead of spaces).

Thanks!

View 3 Replies View Related

Query Analyzer Shows Negative Numbers As Positive Numbers

Jul 20, 2005

Why does M$ Query Analyzer display all numbers as positive, no matterwhether they are truly positive or negative ?I am having to cast each column to varchar to find out if there areany negative numbers being hidden from me :(I tried checking Tools/Options/Connections/Use Regional Settings bothon and off, stopping and restarting M$ Query Analyer in betwixt, butno improvement.Am I missing some other option somewhere ?

View 7 Replies View Related

SqlDumpExceptionHandler - STACK DUMP

Oct 10, 2007

Hi,

I noted some strange errors on my server log (SQL 2005):

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Date,Source,Severity,Message
10/02/2007 09:15:24,Server,Unknown,A user request from the session with SPID 191 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
10/02/2007 09:15:24,Server,Unknown,Error: 17310<c/> Severity: 20<c/> State: 1.
10/02/2007 09:15:24,spid191,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
10/02/2007 09:15:23,spid191,Unknown,Stack Signature for the dump is 0x724D13B0
10/02/2007 09:15:23,spid191,Unknown,78132A36 Module(MSVCR80+00002A36)
10/02/2007 09:15:23,spid191,Unknown,781329AA Module(MSVCR80+000029AA)
10/02/2007 09:15:23,spid191,Unknown,010D83F0 Module(sqlservr+000D83F0)
10/02/2007 09:15:23,spid191,Unknown,010D746E Module(sqlservr+000D746E)
10/02/2007 09:15:23,spid191,Unknown,010D7B71 Module(sqlservr+000D7B71)
10/02/2007 09:15:23,spid191,Unknown,010D764A Module(sqlservr+000D764A)
10/02/2007 09:15:23,spid191,Unknown,010086E7 Module(sqlservr+000086E7)
10/02/2007 09:15:23,spid191,Unknown,010089C5 Module(sqlservr+000089C5)
10/02/2007 09:15:23,spid191,Unknown,0100889F Module(sqlservr+0000889F)
10/02/2007 09:15:23,spid191,Unknown,01041C35 Module(sqlservr+00041C35)
10/02/2007 09:15:23,spid191,Unknown,010438E5 Module(sqlservr+000438E5)
10/02/2007 09:15:23,spid191,Unknown,0102C5F8 Module(sqlservr+0002C5F8)
10/02/2007 09:15:23,spid191,Unknown,011D37E7 Module(sqlservr+001D37E7)
10/02/2007 09:15:23,spid191,Unknown,01BDBEB6 Module(sqlservr+00BDBEB6)
10/02/2007 09:15:23,spid191,Unknown,013C6DB8 Module(sqlservr+003C6DB8)
10/02/2007 09:15:23,spid191,Unknown,01C11D65 Module(sqlservr+00C11D65)
10/02/2007 09:15:23,spid191,Unknown,0102C5F8 Module(sqlservr+0002C5F8)
10/02/2007 09:15:23,spid191,Unknown,011D37E7 Module(sqlservr+001D37E7)
10/02/2007 09:15:23,spid191,Unknown,01BDBEB6 Module(sqlservr+00BDBEB6)
10/02/2007 09:15:23,spid191,Unknown,0103D0C6 Module(sqlservr+0003D0C6)
10/02/2007 09:15:23,spid191,Unknown,0103D23D Module(sqlservr+0003D23D)
10/02/2007 09:15:23,spid191,Unknown,0103D2FE Module(sqlservr+0003D2FE)
10/02/2007 09:15:23,spid191,Unknown,0103D441 Module(sqlservr+0003D441)
10/02/2007 09:15:23,spid191,Unknown,010784B4 Module(sqlservr+000784B4)
10/02/2007 09:15:23,spid191,Unknown,01E22809 Module(sqlservr+00E22809)
10/02/2007 09:15:23,spid191,Unknown,01E28713 Module(sqlservr+00E28713)
10/02/2007 09:15:23,spid191,Unknown,01E15AA8 Module(sqlservr+00E15AA8)
10/02/2007 09:15:23,spid191,Unknown,01E15B68 Module(sqlservr+00E15B68)
10/02/2007 09:15:23,spid191,Unknown,0102E827 Module(sqlservr+0002E827)
10/02/2007 09:15:23,spid191,Unknown,019E9DEB Module(sqlservr+009E9DEB)
10/02/2007 09:15:23,spid191,Unknown,01DA687B Module(sqlservr+00DA687B)
10/02/2007 09:15:23,spid191,Unknown,01DA9914 Module(sqlservr+00DA9914)
10/02/2007 09:15:23,spid191,Unknown,010D3CAC Module(sqlservr+000D3CAC)
10/02/2007 09:15:23,spid191,Unknown,010040C2 Module(sqlservr+000040C2)
10/02/2007 09:15:23,spid191,Unknown,01002C90 Module(sqlservr+00002C90)
10/02/2007 09:15:23,spid191,Unknown,* Short Stack Dump
10/02/2007 09:15:23,spid191,Unknown,* -------------------------------------------------------------------------------
10/02/2007 09:15:23,spid191,Unknown,* *******************************************************************************
10/02/2007 09:15:23,spid191,Unknown,* SegSs: 0000002B:
10/02/2007 09:15:23,spid191,Unknown,* Esp: 1054EBAC: 00000038 C02280E8 00000001 00000000 00000000 1054EBE4
10/02/2007 09:15:23,spid191,Unknown,* EFlags: 00010246: 0057005C 004E0049 004F0044 00530057 0073005C 00730079
10/02/2007 09:15:23,spid191,Unknown,* SegCs: 00000023:
10/02/2007 09:15:23,spid191,Unknown,* Ebp: 1054EBC0: 1054EBE4 010040C2 0000096C FFFFFFFF 1054EC10 00000000
10/02/2007 09:15:23,spid191,Unknown,* Eip: 01002C90: 0AB10FF0 850FC085 0005BAD0 0F003B83 0013C685 0C7D8300
10/02/2007 09:15:23,spid191,Unknown,* Edx: 00000028:
10/02/2007 09:15:23,spid191,Unknown,* Ecx: 0000096C:
10/02/2007 09:15:23,spid191,Unknown,* Ebx: 00000020:
10/02/2007 09:15:23,spid191,Unknown,* Eax: 00000000:
10/02/2007 09:15:23,spid191,Unknown,* Esi: C02280E8: 00000000 00000000 BAA660F0 CF2BC0F0 00000001 009C61F0
10/02/2007 09:15:23,spid191,Unknown,* Edi: 00000028:
10/02/2007 09:15:23,spid191,Unknown,*
10/02/2007 09:15:23,spid191,Unknown,* dbghelp 0D190000 0D2A7FFF 00118000
10/02/2007 09:15:23,spid191,Unknown,* MSVCR71 7C340000 7C395FFF 00056000
10/02/2007 09:15:23,spid191,Unknown,* XPMetaphone 0DD00000 0DD07FFF 00008000
10/02/2007 09:15:23,spid191,Unknown,* xplog70 0DE00000 0DE02FFF 00003000
10/02/2007 09:15:23,spid191,Unknown,* xplog70 0DD20000 0DD2BFFF 0000c000
10/02/2007 09:15:23,spid191,Unknown,* xpsqlbot 0EA50000 0EA55FFF 00006000
10/02/2007 09:15:23,spid191,Unknown,* xpstar90 0DC00000 0DC25FFF 00026000
10/02/2007 09:15:23,spid191,Unknown,* SQLSVC90 0DBF0000 0DBF2FFF 00003000
10/02/2007 09:15:23,spid191,Unknown,* odbcint 0DBD0000 0DBE6FFF 00017000
10/02/2007 09:15:23,spid191,Unknown,* ATL80 7C630000 7C64AFFF 0001b000
10/02/2007 09:15:23,spid191,Unknown,* SqlResourceLoader 0D8F0000 0D8F5FFF 00006000
10/02/2007 09:15:23,spid191,Unknown,* SQLSVC90 0D8C0000 0D8D9FFF 0001a000
10/02/2007 09:15:23,spid191,Unknown,* BatchParser90 0D890000 0D8ADFFF 0001e000
10/02/2007 09:15:23,spid191,Unknown,* ODBC32 0D850000 0D88CFFF 0003d000
10/02/2007 09:15:23,spid191,Unknown,* SQLSCM90 0D830000 0D838FFF 00009000
10/02/2007 09:15:23,spid191,Unknown,* xpstar90 0D7D0000 0D814FFF 00045000
10/02/2007 09:15:23,spid191,Unknown,* msxml3 72E50000 72F61FFF 00112000
10/02/2007 09:15:23,spid191,Unknown,* msxml2 0B7E0000 0B88EFFF 000af000
10/02/2007 09:15:23,spid191,Unknown,* msxmlsql 78800000 788DEFFF 000df000
10/02/2007 09:15:23,spid191,Unknown,* msftepxy 09790000 097A4FFF 00015000
10/02/2007 09:15:23,spid191,Unknown,* SQLNCLIR 095D0000 09602FFF 00033000
10/02/2007 09:15:23,spid191,Unknown,* comdlg32 762B0000 762F9FFF 0004a000
10/02/2007 09:15:23,spid191,Unknown,* COMCTL32 77530000 775C6FFF 00097000
10/02/2007 09:15:23,spid191,Unknown,* sqlncli 337A0000 339BDFFF 0021e000
10/02/2007 09:15:23,spid191,Unknown,* CLBCatQ 777B0000 77832FFF 00083000
10/02/2007 09:15:23,spid191,Unknown,* xpsp2res 10000000 102C4FFF 002c5000
10/02/2007 09:15:23,spid191,Unknown,* ntdsapi 766F0000 76704FFF 00015000
10/02/2007 09:15:23,spid191,Unknown,* SAMLIB 094A0000 094AEFFF 0000f000
10/02/2007 09:15:23,spid191,Unknown,* NTMARTA 77E00000 77E21FFF 00022000
10/02/2007 09:15:23,spid191,Unknown,* dssenh 094B0000 094D3FFF 00024000
10/02/2007 09:15:23,spid191,Unknown,* imagehlp 76C10000 76C38FFF 00029000
10/02/2007 09:15:23,spid191,Unknown,* WINTRUST 76BB0000 76BDAFFF 0002b000
10/02/2007 09:15:23,spid191,Unknown,* dbghelp 09130000 09247FFF 00118000
10/02/2007 09:15:23,spid191,Unknown,* msfte 08ED0000 09127FFF 00258000
10/02/2007 09:15:23,spid191,Unknown,* security 71F60000 71F63FFF 00004000
10/02/2007 09:15:23,spid191,Unknown,* rasadhlp 76F80000 76F84FFF 00005000
10/02/2007 09:15:23,spid191,Unknown,* wshtcpip 07DB0000 07DB7FFF 00008000
10/02/2007 09:15:23,spid191,Unknown,* hnetcfg 07D10000 07D68FFF 00059000
10/02/2007 09:15:23,spid191,Unknown,* WLDAP32 76F10000 76F3DFFF 0002e000
10/02/2007 09:15:23,spid191,Unknown,* winrnr 76F70000 76F76FFF 00007000
10/02/2007 09:15:23,spid191,Unknown,* DNSAPI 76ED0000 76EF8FFF 00029000
10/02/2007 09:15:23,spid191,Unknown,* WSOCK32 07AD0000 07AD8FFF 00009000
10/02/2007 09:15:23,spid191,Unknown,* VERSION 77B90000 77B97FFF 00008000
10/02/2007 09:15:23,spid191,Unknown,* MTXCLU 74F40000 74F58FFF 00019000
10/02/2007 09:15:23,spid191,Unknown,* msvcp60 07A60000 07AC4FFF 00065000
10/02/2007 09:15:23,spid191,Unknown,* MSDTCPRX 079E0000 07A57FFF 00078000
10/02/2007 09:15:23,spid191,Unknown,* XOLEHLP 079D0000 079D5FFF 00006000
10/02/2007 09:15:23,spid191,Unknown,* COMRES 77010000 770D5FFF 000c6000
10/02/2007 09:15:23,spid191,Unknown,* schannel 76750000 76776FFF 00027000
10/02/2007 09:15:23,spid191,Unknown,* cryptdll 766E0000 766EBFFF 0000c000
10/02/2007 09:15:23,spid191,Unknown,* Kerberos 71CA0000 71CF7FFF 00058000
10/02/2007 09:15:23,spid191,Unknown,* iphlpapi 76CF0000 76D09FFF 0001a000
10/02/2007 09:15:23,spid191,Unknown,* msv1_0 76C90000 76CB6FFF 00027000
10/02/2007 09:15:23,spid191,Unknown,* msnsspc 71E20000 71E6FFFF 00050000
10/02/2007 09:15:23,spid191,Unknown,* MSVCRT40 78080000 78090FFF 00011000
10/02/2007 09:15:23,spid191,Unknown,* msapsspc 71E00000 71E13FFF 00014000
10/02/2007 09:15:23,spid191,Unknown,* MSCOREE 79000000 79044FFF 00045000
10/02/2007 09:15:23,spid191,Unknown,* AUTHZ 76C40000 76C53FFF 00014000
10/02/2007 09:15:23,spid191,Unknown,* rsaenh 06450000 0647EFFF 0002f000
10/02/2007 09:15:23,spid191,Unknown,* SQLOS 344D0000 344D4FFF 00005000
10/02/2007 09:15:23,spid191,Unknown,* sqlevn70 4F610000 4F7A0FFF 00191000
10/02/2007 09:15:23,spid191,Unknown,* RESUTILS 74EF0000 74F02FFF 00013000
10/02/2007 09:15:23,spid191,Unknown,* OLEAUT32 77D00000 77D8BFFF 0008c000
10/02/2007 09:15:23,spid191,Unknown,* ole32 77670000 777A3FFF 00134000
10/02/2007 09:15:23,spid191,Unknown,* CLUSAPI 74DE0000 74DF1FFF 00012000
10/02/2007 09:15:23,spid191,Unknown,* instapi 48060000 48069FFF 0000a000
10/02/2007 09:15:23,spid191,Unknown,* psapi 76B70000 76B7AFFF 0000b000
10/02/2007 09:15:23,spid191,Unknown,* comctl32 7DBD0000 7DCD2FFF 00103000
10/02/2007 09:15:23,spid191,Unknown,* SHLWAPI 77DA0000 77DF1FFF 00052000
10/02/2007 09:15:23,spid191,Unknown,* SHELL32 7C8D0000 7D0D2FFF 00803000
10/02/2007 09:15:23,spid191,Unknown,* NETAPI32 71C40000 71C97FFF 00058000
10/02/2007 09:15:23,spid191,Unknown,* opends60 333E0000 333E6FFF 00007000
10/02/2007 09:15:23,spid191,Unknown,* USERENV 76920000 769E3FFF 000c4000
10/02/2007 09:15:23,spid191,Unknown,* WS2HELP 71BF0000 71BF7FFF 00008000
10/02/2007 09:15:23,spid191,Unknown,* WS2_32 71C00000 71C16FFF 00017000
10/02/2007 09:15:23,spid191,Unknown,* MSWSOCK 7DB30000 7DBAFFFF 00080000
10/02/2007 09:15:23,spid191,Unknown,* Secur32 7D8D0000 7D91FFFF 00050000
10/02/2007 09:15:23,spid191,Unknown,* MSASN1 76190000 761A1FFF 00012000
10/02/2007 09:15:23,spid191,Unknown,* CRYPT32 761B0000 76242FFF 00093000
10/02/2007 09:15:23,spid191,Unknown,* GDI32 7D800000 7D88FFFF 00090000
10/02/2007 09:15:23,spid191,Unknown,* USER32 7D930000 7D9FFFFF 000d0000
10/02/2007 09:15:23,spid191,Unknown,* RPCRT4 7DA20000 7DAFFFFF 000e0000
10/02/2007 09:15:23,spid191,Unknown,* ADVAPI32 77F50000 77FEBFFF 0009c000
10/02/2007 09:15:23,spid191,Unknown,* MSVCP80 7C420000 7C4A6FFF 00087000
10/02/2007 09:15:23,spid191,Unknown,* msvcrt 77BA0000 77BF9FFF 0005a000
10/02/2007 09:15:23,spid191,Unknown,* MSVCR80 78130000 781CAFFF 0009b000
10/02/2007 09:15:23,spid191,Unknown,* kernel32 7D4C0000 7D5EFFFF 00130000
10/02/2007 09:15:23,spid191,Unknown,* ntdll 7D600000 7D6EFFFF 000f0000
10/02/2007 09:15:23,spid191,Unknown,* sqlservr 01000000 02BA7FFF 01ba8000
10/02/2007 09:15:23,spid191,Unknown,* MODULE BASE END SIZE
10/02/2007 09:15:23,spid191,Unknown,*
10/02/2007 09:15:23,spid191,Unknown,*
10/02/2007 09:15:23,spid191,Unknown,* TableConfig where number = 186
10/02/2007 09:15:23,spid191,Unknown,* 4240-8be7-b3e5e3a0398e";Local Database="db_name"select val from dbo.Tab
10/02/2007 09:15:23,spid191,Unknown,* c8faa7889b9e53cd3d8b#198;Service="SqlQueryNotificationService-70595aa0-5133-
10/02/2007 09:15:23,spid191,Unknown,* #362; #154;180f615b-9449-472b-bea0-64a372ffd178;c39a6e91984467e28bf6
10/02/2007 09:15:23,spid191,Unknown,* Input Buffer 496 bytes -
10/02/2007 09:15:23,spid191,Unknown,* Access Violation occurred writing address 00000028
10/02/2007 09:15:23,spid191,Unknown,* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
10/02/2007 09:15:23,spid191,Unknown,* Exception Address = 01002C90 Module(sqlservr+00002C90)
10/02/2007 09:15:23,spid191,Unknown,*
10/02/2007 09:15:23,spid191,Unknown,*
10/02/2007 09:15:23,spid191,Unknown,* 10/02/07 09:15:23 spid 191
10/02/2007 09:15:23,spid191,Unknown,* BEGIN STACK DUMP:
10/02/2007 09:15:23,spid191,Unknown,*
10/02/2007 09:15:23,spid191,Unknown,* *******************************************************************************
10/02/2007 09:15:23,spid191,Unknown,SqlDumpExceptionHandler: Process 191 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
10/02/2007 09:15:23,spid191,Unknown,***Stack Dump being sent to d:Microsoft SQL ServerMSSQL.1MSSQLLOGSQLDump2875.txt
10/02/2007 09:15:22,spid191,Unknown,Using 'dbghelp.dll' version '4.0.5'
10/02/2007 09:14:47,Server,Unknown,A user request from the session with SPID 243 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
10/02/2007 09:14:47,Server,Unknown,Error: 17310<c/> Severity: 20<c/> State: 1.
10/02/2007 09:14:47,spid243,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
10/02/2007 09:14:46,spid243,Unknown,Stack Signature for the dump is 0x724D13B0
10/02/2007 09:14:46,spid243,Unknown,78132A36 Module(MSVCR80+00002A36)
10/02/2007 09:14:46,spid243,Unknown,781329AA Module(MSVCR80+000029AA)
10/02/2007 09:14:46,spid243,Unknown,010D83F0 Module(sqlservr+000D83F0)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Could somebody explain me what may cause this error and how repair this, please.

--
Regards,
anxcomp

View 5 Replies View Related

Stack Overflow Sql 2005 Clr

Aug 29, 2007

Please help.
I have a sql 2005 table-value function coded in .net. I'm getting a horrible stack overflow exception with the following call :

select * from dbo.clr_DecodeTime(-15809);

The code is here :

public partial class UserDefinedFunctions

{

[SqlFunction(TableDefinition= "ArrTime nvarchar(4), DepTime nvarchar(4)",FillRowMethodName="ProcessesFillRowTime")]

public static IEnumerable clr_DecodeTime(int EncodedTime)

{

List<Airports> airport = new List<Airports>();

Airports a = new Airports();

a.ArrTime = "1000";

a.DepTime = "1100";

airport.Add(a);

return airport;

}

public static void ProcessesFillRowTime(Object o, out SqlChars arrTime, out SqlChars depTime)

{

Airports airport = o as Airports;

arrTime = new SqlChars(airport.ArrTime);

depTime = new SqlChars(airport.DepTime);

}

};

catch (Exception Ex)

{

throw new Exception(Ex.Message);

}

public class Airports

{

private string arrcode;

public string ArrCode

{

get

{

return arrcode;

}

set

{

arrcode = value;

}

}

private string depcode;

public string DepCode

{

get

{

return depcode;

}

set

{

depcode = value;

}

}

private string depdate;

public string DepDate

{

get

{

return DepDate;

}

set

{

DepDate = value;

}

}

private string arrdate;

public string ArrDate

{

get

{

return ArrDate;

}

set

{

ArrDate = value;

}

}



private string arrtime;

public string ArrTime

{

get

{

return ArrTime;

}

set

{

ArrTime = value;

}

}



private string deptime;

public string DepTime

{

get

{

return DepTime;

}

set

{

DepTime = value;

}

}

}

}
The message I get back is :

Msg 6538, Level 16, State 49, Line 1

.NET Framework execution was aborted because of stack overflow.
Every time I try and debug the function my pc hang. ps I'm using vista business edition and vs 2005.

View 3 Replies View Related

Stack Error - EXCEPTION_ACCESS_VIOLATION

Nov 16, 2007

Folks:


I am getting the following stack error in my SQL Server logs. I understand that there is a Microsoft Hotfix available for this and would like to know where will I find the HOTFIX for this because I didn't find it on Microsoft Website. We are currently on SQL 2000 SP 4 (Windows Server 2003 SP1).


Thanks !


*****************************************************************************
Computer type is AT/AT COMPATIBLE.
Bios Version is IBM - 1000
Current time is 09:02:25 11/16/07.
4 Intel x86 level 6, 2992 Mhz processor(s).
Windows NT 5.2 Build 3790 CSD Service Pack 1.


Memory
MemoryLoad = 56%
Total Physical = 4095 MB
Available Physical = 1800 MB
Total Page File = 8026 MB
Available Page File = 6052 MB
Total Virtual = 2047 MB
Available Virtual = 203 MB

*Stack Dump being sent to e:mssql2000dataMSSQLlogSQLDump0014.txt
* *****************************************************************************
**
*
* BEGIN STACK DUMP:
* 11/16/07 09:02:25 spid 59
*
* Exception Address = 009BF883 (CDStream:rintDumpHeader + 000007A7 Line 0+0
0000000)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address FFFF0002
* Input Buffer 92 bytes -
* exec dbo.QS_SoSSE15_ConnectionDetails @spid=67
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 00CBAFFF 008bb000
* ntdll 7C800000 7C8BFFFF 000c0000
* kernel32 77E40000 77F41FFF 00102000
* ADVAPI32 77F50000 77FEBFFF 0009c000
* RPCRT4 77C50000 77CEEFFF 0009f000
* MSVCP71 7C3A0000 7C41AFFF 0007b000
* MSVCR71 7C340000 7C395FFF 00056000
* opends60 41060000 41065FFF 00006000
* SHELL32 7C8D0000 7D0D3FFF 00804000
* msvcrt 77BA0000 77BF9FFF 0005a000
* GDI32 77C00000 77C48FFF 00049000
* USER32 77380000 77411FFF 00092000
* SHLWAPI 77DA0000 77DF1FFF 00052000
* sqlsort 42AE0000 42B6FFFF 00090000
* ums 41070000 4107DFFF 0000e000

*****************************************************************************


View 1 Replies View Related

T-SQL (SS2K8) :: One Stored Procedure Return Data (select Statement) Into Another Stored Procedure

Nov 14, 2014

I am new to work on Sql server,

I have One Stored procedure Sp_Process1, it's returns no of columns dynamically.

Now the Question is i wanted to get the "Sp_Process1" procedure return data into Temporary table in another procedure or some thing.

View 1 Replies View Related

SQL Server 2014 :: Embed Parameter In Name Of Stored Procedure Called From Within Another Stored Procedure?

Jan 29, 2015

I have some code that I need to run every quarter. I have many that are similar to this one so I wanted to input two parameters rather than searching and replacing the values. I have another stored procedure that's executed from this one that I will also parameter-ize. The problem I'm having is in embedding a parameter in the name of the called procedure (exec statement at the end of the code). I tried it as I'm showing and it errored. I tried googling but I couldn't find anything related to this. Maybe I just don't have the right keywords. what is the syntax?

CREATE PROCEDURE [dbo].[runDMQ3_2014LDLComplete]
@QQ_YYYY char(7),
@YYYYQQ char(8)
AS
begin
SET NOCOUNT ON;
select [provider group],provider, NPI, [01-Total Patients with DM], [02-Total DM Patients with LDL],

[Code] ....

View 9 Replies View Related

Connect To Oracle Stored Procedure From SQL Server Stored Procedure...and Vice Versa.

Sep 19, 2006

I have a requirement to execute an Oracle procedure from within an SQL Server procedure and vice versa.

How do I do that? Articles, code samples, etc???

View 1 Replies View Related

Msg 102, Level 15, State 1, Procedure Dni_invoices_get, Line 37

Feb 20, 2007



Hello,



I am using SQL express as a backend for my websites and my accounting software.

When installing my new app I run the install.sql file and all is good untill the end.

the following error occurs. Can someone direct me where to look to fix this please?

Msg 102, Level 15, State 1, Procedure dni_invoices_get, Line 37

Incorrect syntax near '.'.



Thanks eveningjazz

View 3 Replies View Related

I Need To Update A Table With Random Numbers Or Sequential Numbers

Mar 11, 2008



I have a table with a column ID of ContentID. The ID in that column is all NULLs. I need a way to change those nulls to a number. It does not matter what type of number it is as long as they are different. Can someone point me somewhere with a piece of T-SQL that I could use to do that. There are over 24000 rows so cursor change will not be very efficient.

Thanks for any help

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved