Is It Possible To Put The Raiseerror In A Text File Or Show It To The User After Its Been Inserted.

Oct 29, 2007

I am in process of building a website where the user can upload files and then those files are loaded in to a sql server database. I am using some sprocs to scrub the data and then insert them into the production database.. And in my sprpc before and after updating or inserting a record or scrubing... i am returning the count by raising an error. or returning the rownumber where the error occured.. is there any way  i can get the raise error part or whatever error i get while scrubing the data and relay it back to the user in a user freindly way or in a text file... or the best thing is can i open smalll window where i can show them what processing is goin on and alert them if there are any errors...

 Any help will be appreciated.

Regards

Karen 

  

View 5 Replies


ADVERTISEMENT

Reporting Services :: Show Image Once User Clicks Text Box?

Nov 19, 2015

I tried creating Toggle Option over a Text box to Show the Image on Click but Since the Toggle refreshes the entire report user faces performance issue. Is there any other option to avoid the Toggle Refreshing the report or to show an image on Click of an Text Box?

View 3 Replies View Related

Is There A Way To Show A User-friendly Error When User Did Not Select A Required Parameter ?

Apr 9, 2007

Hi all,



I was wondering whether there is a way to show the user an error when the user did not select a specific parameter.



In my case, I have two optional parameters. The user has to select either one to view the report. If the user does not select either one, I would like to show some sort of an error page indicating so. However, all i am getting is a complete blank with no report in sight. I as a developer know this is an error as a result of missing parameters, but i was wondering whether I could produce a page or direct it to a page so that the user doesn't go all horrified at an empty page ?



Thanks

Bernard

View 4 Replies View Related

Show User Groups Associated With User ID Report From Active Directory

Jan 11, 2008



Hello. I am trying to write a report that pulls information in from Active Directory. I have a view created that gets a listing of users and a view that creates a listing of user groups, but I can't seem to figure out how to get all user groups that are associated with the users. This is what I have.



SELECT TOP 100 PERCENT *
FROM OPENQUERY(ADSI, 'SELECT cn, groupMembershipSAM FROM ''LDAP://wmdomain.local'' WHERE objectcategory=''group''') Rowset_1



SELECT *
FROM OPENQUERY(ADSI,
'SELECT title, displayName, sAMAccountName, givenName, telephoneNumber, facsimileTelephoneNumber, sn
FROM ''LDAP://wmdomain.local''
WHERE objectCategory = ''Person'' AND objectClass = ''user''')
Rowset_1



Let me know if you have any suggestions!



BJ

View 1 Replies View Related

Inserted Text Take The Wrong Alignment

Jul 27, 2006

i try to insert the following string in the database

the red car (driver)

this string save like this

)the red car (driver

i have a problem when inserting string contains special character at the end of the string.

we have arabic and english string like this

تعني شعاعي (R) radial كلمة

and it appear in reverse like this

كلمة (R) radial تعني شعاعي

View 5 Replies View Related

What Datatype To Use When Inserted Large Amount Of Text

Jun 27, 2005

What datatype to use when inserted large amount of Text ??

View 6 Replies View Related

What Is The User Of Inserted And Deleted Tables In Sql Server 2005

Mar 26, 2008

can anybody tell me with an example how to use Inserted and Deleted in Sql Server 2005

View 7 Replies View Related

Using Inserted / Deleted Tables With Text / NText / Image Data Type

Oct 6, 2004

Hi folks,

Table:

a int,
b int,
c int,
d text

I need to change my AFTER - Trigger from this (example!):

select * into #ins from inserted

to something like

select *(without Text / nText / image -columns) into #ins from inserted.

So I tried to build a string like this: (using INFORMATIONSCHEMES)

select @sql = 'select a,b,c into #ins from inserted'
exec(@sql)

a,b,c are not of Text, nText or Image datatype.

After executing the trigger, I get an error, that inserted is unknown.

Does anyone know how to solve this ?

Thx.

View 5 Replies View Related

&<Long Text&> Doesn't Show Up

Mar 21, 2006

I have a question that has a co-worker and myself confused. We are using the SQL Server Enterprise Manager. When I select return all rows in my tables, any content that is too long will appear as <Long Text> on my co-workers machine, but the column is blank on my machine. Is there a property or configuration that enables/disables <Long Text>? I am confused as to why it appears on other machines, but not mine.

Your help is appreciated.

Live Life.

View 8 Replies View Related

Show Date Parameter In A Text Box

Aug 29, 2007

I have a report that pulls data for the following date parameters:

DECLARE @STARTDATE datetime, @ENDDATE datetime
SET @STARTDATE = GETDATE()-3
SET @ENDDATE = GETDATE()
Select * from tablename where reportdate between @STARTDATE and @ENDDATE

This query works fine. I wanted to show the parameters chosen in a text box in the report so the user knows the date range the report was run. I tried using the following:
"Discharge Date between " & Parameters!STARTDATE.Value & " and " & Parameters!ENDDATE.Value
but I am getting a forward dependancy error. I have also tried setting a default value but can not get the correct code to subtract three days from Now()

Can someone help me with this one?

View 5 Replies View Related

Issue With Raiseerror

Apr 11, 2008

I have an issue with the error message that is being raised in a stored procedure:
RAISERROR('Error inserting Value %d into Order_Header_Reference_Code_XREF for Order_Header_ID %d and Reference_Code_ID %d', 10, 1, @Value, @OrderHeaderID, @ReferenceCodeID)
Here is the result after executing my procedure with "@Value = 'test'"
Error inserting Value 114994016 into Order_Header_Reference_Code_XREF for Order_Header_ID 10801 and Reference_Code_ID 1
 
114994016 should say 'test' right?
Does anyone see an issue with my raiseerror statement?

View 3 Replies View Related

Way To Show User Name When They Are Sysadmin

May 13, 2003

Is it possible to show the user name (such as 'phuser') who is a member of the sysadmin group (NOT my idea!) I notice if you go to current connections is SQL EM the name shows, but if I login as that user if I try, user, user_name, etc inside of QA it shows DBO

View 4 Replies View Related

Have Total Show Under User

Sep 23, 2015

(SQL Server 2008) I want to display a total for each user that is returned from my query result. I was trying the union all route as that is what I am most comfortable with, however, the result set returns the total row at the bottom instead of under each user. This is the desired result set...Here is my query, what do I need to alter to have the output display like so?

Code:
Create Table #Test
(
id varchar(50),
name varchar(500),
out1 int,
out2 int,
total4day int,

[code]....

View 5 Replies View Related

When Exporting To Excel - The Numbers Show Up As Text

Apr 4, 2007

Hi,

is there a way to force the numers to show in excel as numbers, not as text?



Thanks,

Igor

View 1 Replies View Related

RAISEERROR Not Throwing Exception In .NET

Jul 9, 2007

I am calling a stored procedure that looks like this.


Code:


ALTER PROCEDURE [dbo].[VerifyLogin]
-- Add the parameters for the stored procedure here
@Email nvarchar (100),
@Password nvarchar (200)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @Count int
DECLARE @Accounts int

SET @Accounts = (Select Count(*) from Users Where UPPER(Email) = UPPER(@Email))

IF @Accounts = 0
BEGIN
RAISERROR('E-mail address not found.', 10, 1)
END
ELSE
BEGIN
SET @Count = (Select Count(*) from Users Where UPPER(Email) = UPPER(@Email) and Password = @Password)

IF @Count > 0
select 1 as Verification
ELSE
select 0 as Verification
END
END



When I enter a login that does not exist, the error is not thrown in .net. Tracing the code shows normal execution. What am I doing wrong?

View 1 Replies View Related

Raiseerror Does Not Raise Exception

Aug 16, 2006

Hi friends



i've a stored proc (sql 2005) that'll raiseerror statement when something violated.



but my C# application that calls this stored proc does not any throw exception when this happens !!



i remember visual basic used to through an exception for this type of things.



is it different in C# and how do we handle this scenario ?



Thanks for ur ideas.

View 10 Replies View Related

Check Constraint To RAISEERROR On 547 16 1

Mar 15, 2008



Hi, I need the T-SQL statement on how to raise a custom error message for a check contraint @au_id '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]' when ever a client enters the wrong SSN format such as 575-444865. I used the t-sql statement below but does not work when running an insert on the authors table ; au_id column.

CREATE TRIGGER trg_datavalidate
ON authors
FOR INSERT
AS
DECLARE @au_id varchar(11)
DECLARE @err INT

SELECT @err = @@ERROR
from inserted
IF @err = 547
BEGIN
PRINT 'Au_id needs to be in the SSN format xxx-xx-xxxx!. Error Number:'
+ CAST(@err AS VARCHAR)
RAISERROR ('au_id must be in the format of xxx-xxxxxx where x is a number.', -- Message text.
16, -- Severity.
1 -- State.
);
ROLLBACK TRANSACTION
END

View 4 Replies View Related

RAISEERROR From CLR Stored Procedures

May 14, 2005

I'm writing:

View 7 Replies View Related

Where Do User-defined Defaults Show Up?

Mar 22, 2007

I created the following Default


CREATE DEFAULT HelloWorld AS 'HelloWorld'

Now, tell me how can I get the information for this default? I can find it in sys.objects and it says its a DEFAULT CONSTRAINT, but sys.default_constraints does not show anything. Anyone?

Thanks

View 3 Replies View Related

RaiseError Inside Stored Procedure

Aug 5, 2006

I want to execute some insert statements within a stored procedure and commit those changes regardless of any raiseerror that occurs later in the stored procedure. My difficulty is that I am forced to use raiseerror with severity 16 in order to send a message through the powerbuilder application interface (compiled vendor code). I have tried save points but can't get that to save my insert and still present an error to the user about something else that happens later.



here is an example

BEGIN procedure

Insert something and save it even if error is raised below

RaiseError('you made a mistake and need to do this.',16,-1)

END procedure



View 5 Replies View Related

How To Show Only Records That Belong To The Logged In User.

Sep 28, 2007

Hello.I realize that this question has been asked before, but I still can't get it to work. Below are some links that might be of help:http://forums.asp.net/p/1159666/1913519.aspx#1913519http://forums.asp.net/p/1161930/1924264.aspxhttp://forums.asp.net/p/1116601/1732359.aspx#1732359http://forums.asp.net/t/1104718.aspxhttp://forums.asp.net/p/1096290/1655706.aspx#1655706http://forums.asp.net/p/1110162/1707952.aspx#1707952 Basically, I need a DropDownList to display only projects for which the logged in user is assigned as leader. The [Projects] table contains an integer ProjectId, a string ProjectName, a uniqueidentifier ProjectLeader, and other fields. Can someone help me with the SQL query and code?  * Here is the definition of the SqlDataSource: <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDB.MDFConnectionString %>" SelectCommand="SELECT [ProjectId], [ProjectName] FROM [Projects] WHERE ([ProjectLeader] = @Leader)" OnSelecting="SqlDataSource5_Selecting"> <SelectParameters> <asp:Parameter Name="Leader" Type="Object" /> </SelectParameters> </asp:SqlDataSource>  * Here is the definition of the SqlDataSource5_Selecting method:   protected void SqlDataSource5_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { e.Command.Parameters("@Leader").Value = loggedInUserId; } where loggedInUserId is a global variable of type System.Guid. It has been evaluated in the Page_Load event to as: loggedInUserId = (System.Guid)Membership.GetUser().ProviderUserKey; Now the first problem I encounter is that when I run the page, the compiler complains and says, "error CS0118: 'System.Data.Common.DbCommand.Parameters' is a 'property' but is used like a 'method'." The second problem is when I insert the line: SqlDataSource5.SelectParameters("Leader").DefaultValue = loggedInUserId; in page_Load. The compiler again says, "error CS0118: 'System.Data.Common.DbCommand.Parameters' is a 'property' but is used like a 'method'." I've spent a long time trying to figure it out, but could not solve it. I would appreciate it if someone can help me out. Thank you very much. 

View 11 Replies View Related

How To Show Partial Report Based On User

Mar 18, 2008

Hi, I am new to SSRS. Is there a way to show part of a report based on User. Say we have a report consisting data for all department. When a department director view it, the report only display data for his/her department. Can this be achieved in SSRS? Thank you in advance for your help.

View 3 Replies View Related

Output Columns For Flatfile - Text Qualifiers Dont Show Up

Sep 14, 2007

I explicitly set one column to have text qualifiers in a flat file connection mgr and specified to use double quotes as the qualifier, yet in the output file, the column is not qualified. What did I leave out ?

View 2 Replies View Related

SQL 2012 :: How To Show All Files Uploaded To Server By A User

Oct 16, 2015

In our new app, a user is given the option of uploading one or files to the server and saving the filename and path to the database.

We would like to display all files associated with a particular user.

Obviously, the code below is only displaying one file.

How to display all files associated with a particular employee?

select ROW_NUMBER()OVER (ORDER BY empID) as empnum , fName, filePath from Employee where EmpID='KF14170';

I might add the format of the file is empID plus the filename:

Example: KF14170Evidence1, KF14170Evidence2.

View 1 Replies View Related

How To Solve Tables Or Functions 'inserted' And 'inserted' Have The Same Exposed Names.

Jul 23, 2005

Hi all!In a insert-trigger I have two joins on the table named inserted.Obviously this construction gives a name collition beetween the twojoins (since both joins starts from the same table)Ofcourse I thougt the usingbla JOIN bla ON bla bla bla AS a_different_name would work, but itdoes not. Is there a nice solution to this problem?Any help appriciated

View 1 Replies View Related

What Is The Best Way To Combine Two Text File Into One Text File In SSIS

Mar 20, 2008



Hi,

I am looking for a way to combine two text files into one file. I am thinking of using a batch file (DOS command ) to do it. Any suggestion please?

View 6 Replies View Related

Reporting Services :: Show Text And Embedded Image In SSRS TextBox

Oct 7, 2015

I'm developing an SSRS report using VS2013 Premium with SSDT - BI v12.0.2430.0. SSRS is hosted on a SQL 2014 instance.The underlying database table has a varchar(max) field which stores text and embedded image data from a third-party application.  I can extract this text, save it as an html file and open that in a browser.  It renders complete with any embedded image.Meanwhile, the report textbox has its Placeholder Properties, Markup type set to HTML.  Yet when I run the report, the text is displayed but any embedded image is not.Is there any approach I can take, perhaps transforming the varchar(max) data to another format in the query for my dataset, that can show the text and any embedded image in my report?  Or is it that the TextBox control is limited, not unreasonably, to text only?  If so, is there another control I could use, perhaps custom or third-party?

View 7 Replies View Related

Show/hide A Field Based On The Logged In User In Reports

Apr 24, 2007

Hi,



I have some sensitive and non-sensitive info/fields in one of my reports. Is there a way to hide/show the info based on the logged in user? or do I have to create separte reports for each type of info like one for sensitive and another one for non-sensitive info.



Thanks inadvace for your help!



View 3 Replies View Related

SQL 2012 :: Replicated Database Log File Grows Exponentially With Few Row Deleted / Inserted

Jun 29, 2015

I have a publisher database set up for a merge replication. This is using parameterized filter with join filters.

I also have a stored procedure that does deletes & inserts on the table where the parameterized filter is applied to aid in changing a subscriber's eligibility to receive so and so data. I have observed that running the stored procedure takes extraordinarily long and as a result, the log file grows to a size 1.5 - 2.5 times the database size.

At first I reasoned that this might because I had it set up to use precomputed partitions and changing it requires recalculating the partitions. As a test, I turned off the precomputed partitions. Didn't work. I turned on "optimize synchronization" AKA "keep_partition_changes", which normally is not available when you have precomputed partition on, and that didn't work, either.

At this point, I think I can rule out precomputed partitions being a problem here but I'm stumped now what else I should do to reduce the amount of log writes being required. We do need the parameterized filters & join tables, so that can't go.

View 0 Replies View Related

Reporting Services :: Display Only First Few Words Of A Block Of Text With Show More Link At The End (SSRS 2012)

Nov 6, 2015

Is it possible to display only the first few words of a block of text with a "Show More" link at the end, which when clicked would expand the block to show all content?

"Collapsed":
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
<...show more>

"Expanded":
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<... show less>

View 2 Replies View Related

How To Show The User Selected Values In Page Header By Using Parameters Which I Have Already Created In The Report

Dec 10, 2007

Hi ,

I am working on Sql server Reporting Services(Sql Server 2005),

i have designed a Report and deployed that report on Report Server, on this report i need to show the user selected values
in page header by using Parameters which i have already created in the Report.

There are 35 to 40 fields in the Front End(Asp.net2.0)

on passing all these values from front end Report is prompting for parameters which is not desired for my case even though i have made ShowParameterPrompts to false.



Thanks in advance

Srinivas Govada

View 1 Replies View Related

Getting Identity Of Inserted Record Using Inserted Event????

Jun 5, 2006

is there any way of getting the identity without using the "@@idemtity" in sql??? I'm trying to use the inserted event of ObjectDataSource, with Outputparameters, can anybody help me???

View 1 Replies View Related

User-defined Stored Procedures InsertCustomerin Northwind Database That Is Cached In Database Explorer:No New Values Inserted?

Jan 14, 2008

Hi all,

I put "Northwind" Database in the Database Explorer of my VB 2005 Express and I have created the following stored procedure in the Database Exploror:

--User-defined stored procedure 'InsertCustomer'--

ALTER PROCEDURE dbo.InsertCustomer

(

@CustomerID nchar(5),

@CompanyName nvarchar(40),

@ContactName nvarchar(30),

@ContactTitle nvarchar(30),

@Address nvarchar(60),

@City nvarchar(15),

@Region nvarchar(15),

@PostalCode nvarchar(10),

@Country nvarchar(15),

@Phone nvarchar(24),

@Fax nvarchar(24)

)

AS

INSERT INTO Customers

(

CustomerID,

CompanyName,

ContactName,

ContactTitle,

Address,

City,

Region,

PostalCode,

Country,

Phone,

Fax

)

VALUES

(

@CustomerID,

@CompanyName,

@ContactName,

@ContactTitle,

@Address,

@City,

@Region,

@PostalCode,

@Country,

@Phone,

@Fax

)
=================================================
In my VB 2005 Express, I created a project "KimmelCallNWspWithAdoNet" that had the following code:
--Form_Kimmel.vb--
Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Public Class Form_Kimmel


Public Sub InsertCustomer()

Dim connectionString As String = "Integrated Security-SSPI;Persist Security Info=False;" + _

"Initial Catalog=northwind;Data Source=NAB-WK-EN12345"

Dim connection As SqlConnection = New SqlConnection(connectionString)

connection.Open()

Try

Dim command As SqlCommand = New SqlCommand("InsertCustomer", connection)

command.CommandType = CommandType.StoredProcedure

command.Parameters.Add("@CustomerID", "PAULK")

command.Parameters.Add("@CompanyName", "Pauly's Bar")

command.Parameters.Add("@ContactName", "Paul Kimmel")

command.Parameters.Add("@ContactTitle", "The Fat Man")

command.Parameters.Add("@Address", "31025 La Jolla")

command.Parameters.Add("@City", "Inglewoog")

command.Parameters.Add("@Region", "CA")

command.Parameters.Add("@Counrty", "USA")

command.Parameters.Add("@PostalCode", "90425")

command.Parameters.Add("@Phone", "(415) 555-1234")

command.Parameters.Add("@Fax", "(415 555-1235")

Console.WriteLine("Row inserted: " + _

command.ExecuteNonQuery().ToString)

Catch ex As Exception

Console.WriteLine(ex.Message)

Throw

Finally

connection.Close()

End Try



End Sub

End Class
==============================================


I executed the Form_Kimmel.vb and I got no errors. But I did not get the new values insterted in the table "Custermers" of Northwind database. Please help and tell me what I did wrong and how to correct this problem.

Thanks in advance,
Scott Chang

View 10 Replies View Related







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