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


ADVERTISEMENT

How Can I Uplaod Image File To SQL Server And Display Uploaded Files

Jan 28, 2008

This is my first time to create web site by using Visual web developer express 2005. I want to create company's activity member profile web page by use sql database. But I don't know how to create SQL DB and Table and I don't know code for connect to sql server, code for upload image files, data file, and code for displays images. So please tell me how to do it step by step. (I use VS web developer express 2005 with vb.net) Thank you 

View 3 Replies View Related

How To Store Uploaded Files In An SQL Database?

Apr 11, 2007

Hi FriendsCan anyone tell me how to store uploaded files from the user to the SQL database and later give an option of downloading the file probably in the form of a GridView control. How do we write code to allow the user to download the uploaded files. I have written code to upload and store the files into a folder, however, I'm not able to collect data from the folder later and the folder is only accessible offline using the server system which I do not want to happen. Can anyone help me with this?Thanks 

View 1 Replies View Related

Antivirus Scanning Of Files Uploaded Via Report Manager

Feb 12, 2008

For those who want to know the root of my question without any of the detail:

I want to know if there is any recommended way to detect and remove potential malware from files uploaded to SQL 2005 Reporting Services via the Report Manager.

Here's a general description of our setup and challenge:

We have a Windows 2003/SQL 2005 Enterprise Server as the reporting database server and another server running Windows 2003/IIS 6.0/ColdFusion MX7/SQL 2005 Reporting Services as the web server. The Report Server is only used internally, but has a potential user community of approximately 150,000. The actual community of users who would have access to the Report Manager would be much smaller.

In our environment, we have no way of ensuring that virus scans are being performed at all of the clients, so we need a way to make sure that files uploaded through Report Manager are all being checked as they are coming in to the Report Server.

Here's what we've tried so far:


We downloaded the Eicar A/V test file and verified that Report Manager has no problem accepting it as an uploaded files by default. The servers are running Norton AntiVirus Corporate 10.2 with the latest definitions and it did not detect the virus as it was being loaded in to the database.

Next, I setup Microsoft ISA 2006 in reverse proxy mode with Kaspersky's Antivirus for ISA. Kaspersky does not prevent a client from uploading the test file to Report Manager, but it does prevent the user from downloading it, so it seems that it only works with HTTP get operations and ignores HTTP put operations.

I have had Watchguard come in with a Firebox (an appliance that they claimed could A/V scan files), but it provided similar results. Files uploaded to Report Manager were ignored, but infected files downloaded were blocked.

I have BlueCoat, TrendMicro, and CheckPoint all on tap to come in and see if they can fare any better, but I am not holding much hope for this.

I know that SharePoint has an API that virus scanners can use (VSAPI) for scanning binaries stored within its SQL database. Is there anything similar for SQL Reporting Services? Is there any other way of preventing these files from entering the application?

Thanks for reading and any responses. I am happy to provide more details if it would be helpful.

View 1 Replies View Related

SQL 2012 :: FOR FILES Command To Delete Old Backup Files On Remote Server?

Feb 24, 2015

I have the need to delete old backup files via TSQL job. Found this solution online:

PushD "
emoteservershareDIFF" &&(
forfiles -m *DIFF*.sqb -d -1 -c "cmd /c del /q @path"
) & PopD

It works remotely if I run it via command prompt. But when I add this to a TSQL job on my remote SQL instance, it runs without deleting anything. What I'm missing?

View 6 Replies View Related

SQL Server 2012 :: Show Empty Output With 0?

Oct 7, 2014

I have a sql query that gets the count of exams held in each month.

Below is the code that I have used.

select Examid, count(*) as CumCount
from [dbo].[Exams] where ExamCategory in ('Major','Critical') and Month(EXOCCRDATE) = Month(getdate())
and Year(EXOCCRDATE) = Year(getdate()) group by Examid

The code works good when we have data for the current month. When we dont have any exams for the current month, the code outputs empty values. I want the code to be altered so that when there is no value returned in the output, i want a default value shown in the output.

I have attached the sample data that I am using. In the data we dont have dates for the month of October. So when I run the code it will display empty output. So what I need is I need a text like 'No Data' to be shown when no value is returned by the query.

I tried using case but it does not work.

View 6 Replies View Related

SQL Server 2012 :: How To Show Only First Friday Of Every Month

Jul 2, 2015

I am having one requirement where I want to show only first Friday of every month of 2014,2015 and 2016 year.

View 9 Replies View Related

SQL Server 2012 :: Show Encryption For Connections

Nov 3, 2015

I have setup ssl encryption for SQL connections by using a self-signed certificate (not the best I know) and setting "Force Encryption" to Yes. Now I am trying to show that the connection is indeed encrypted and I like to see which the ssl-key is used for a connection; preferably the one that I provided. How can I do this? I am just not comfortable trusting the OS or SQL to do what I ask.The query "SELECT encrypt_option FROM sys.dm_exec_connections" Shows incrypted but no extra info.

View 0 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

SQL Server 2012 :: Query To Find User Who Last Modified User Roles / Access?

Dec 6, 2013

I would like to know if there is a way to find out who changed a users roles/access WITHOUT using the audit function. For example, if a user account was created and given SA access then changed to read only, how can I find out who made that change? I tried searching for an answer, but kept getting no results. I'm thinking this may tie into the sys.sysusers view?

View 3 Replies View Related

SQL Server 2012 :: Finding Duplicates And Show Original / Duplicate Record

Nov 3, 2014

There are many duplicate records on my data table because users constantly register under two accounts. I have a query that identify the records that have a duplicate, but it only shows one of the two records, and I need to show the two records so that I can reconcile the differences.The query is taken from a post on stack overflow. It gives me 196, but I need to see the 392 records.

How to identify the duplicates and show the tow records without having to hard code any values, so I can use the query in a report, and anytime there are new duplicates, the report shows them.

SELECT
[groom_first_name]
,[groom_last_name]
,[bride_first_name]
,[bride_last_name]

[code]....

View 5 Replies View Related

SQL Server 2012 :: Results To Show Differences In Items Purchased Versus Sold?

Jun 3, 2014

I am looking for a way to show how I can have a result set that shows a record with one item and the number of records where it was purchased or sold. Below is my sample data.

Use tempdb
go
create table #ItemLedgerEntry
(
ENTRYNO INT NOT NULL
, ITEMNO VARCHAR (50) NOT NULL
, POSTINGDATE DATETIME NOT NULL
, ENTRYTYPE INT NOT NULL

[code]....

I know something like this will give me results but I'd like to run one query.

select itemno, count(*) from #ItemLedgerEntry where entrytype = 0
group by itemno
order by count(*) desc

View 5 Replies View Related

Reduce File Size Of Image When Uploaded To Sql Server

Nov 2, 2004

Hi,

Is it possible to reduce the file size of an image when the user uploads it into a sql server image field.
i.e Crush it from 500K to less.

Regards,

RG

View 5 Replies View Related

Can't Get SQL Express To Show Up In My Program Files

Oct 28, 2007

I just downloaded SQL 2005 and SQL Express. I'm not seeing SQL Express in my Program files yet when I open SQL server configuration manager it AND SQL Server 2005 Services it says it's running. SQL Server Browser is NOT.

What am I doing wrong?

View 1 Replies View Related

Show Files And Create Link To It .....

Jun 21, 2007

Hi



I Need To Load Files From A Library Show Them In The Report

And After, TO be Able To Click On one Of These Files And See Them.

The File Types Are Jpeg, Gif, Doc, Txt....



Thanks



Roy

View 1 Replies View Related

SQL 2012 :: Copy Backup Files From One Server To Another?

Sep 23, 2014

I've an emergency requirement to copy Source server database backup files to destination Server through xcopy command. Backup job on source server runs daily, so once this job get completes all databases backups needs to be moved to destination server. But here the main concern is "the backup files on destination server shouldn't be overwritten, they should be placed separately as Source server job runs daily".

We've a command which overwrites backups on destination server. But we need to keep backups on destination at-least for 4 weeks (means : retention should be 4 Weeks).

View 5 Replies View Related

SQL 2012 :: Attaching SSAS Database Files On A Different Server?

Jun 26, 2015

I can detach/attach SSAS database.But I have a software that protects(backs up) the files of the SSAS Database.

What the customer needs is to be able to take these backed up files and port it to a different server and attach it there.But the new server complains that these files have no corresponding detach-log files.

The customer doesn't want to backup and restore the SSAS databases.

View 2 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

SQL Server 2012 :: How To Fetch PDF Files From A Folder And Saving It In The Database

Jul 23, 2013

I have a small project to be done in which I need to fetch the pdf file from a my system and save it in database and also fetch the name of it and save it in the database.

View 9 Replies View Related

SQL 2012 :: How Server Fills Empty Spaces In Data Files

Oct 1, 2015

I understand that we shouldn't shrink data files as it might cause heavy fragmentation along with log usage, high IO/CPU etc.

In a DB in which lot of DML transaction occur, there will be empty spaces whenever deletions occur.

Will SQL Server fill that part with data when new insertions occur ?.

View 4 Replies View Related

Recovery :: SSMS Won't Show Bak Files Or Even Folders Using Enterprise Admin Account?

Oct 16, 2015

I'm working on a newly installed windows 2012 R2 server which has SQL Server 2012 and SSMS installed on it. What has been odd is that when I open the "restore database" dialog, in the "Select Backup Devices", "Locate Backup File" dialog, only the immediate folders off of the root of the E: drive are visible. E: is where sql server data and backup files are stored.

The account I am logged in with is supposed to have Enterprise Admin rights. How is can I not see these folders and files? The files are certainly there and are visible to me on that login with windows explorer. I am able to backup via SSMS without issue.

When I look at the folder's permissions everything seems normal. If I add "Everyone" to that folder's permissions the folders and files become visible. The SQL Server service is running on the NT ServiceMSSQLSERVER account, which is normal for my other installations of sql server.

View 12 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

SQL Server 2012 :: Where To Find List Of Values For Event Data Files

Jan 21, 2015

Got following query:

SELECT
event_data.value('(event/data/value)[4]', 'bigint') AS cpu_time,
--database name
event_data.value('(event/data/value)[5]', 'bigint') AS duration,
--estimated cost
--estimated rows
--nest level

[code]...

Basically, is a simple T-SQL query that reads the local file for my already setup extended event sessions. But I can't find the way to retrieve the following attributes as part as the T-SQL query:

--database name
--estimated cost
--estimated rows
--nest level
--object name

I am trying to find a BOL or some MS link with the full list of possible values for event_data.value but can't find one.

View 2 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

Sending Uploaded Image To Data Access Class When Storing Image In SQL Server 2005

Apr 20, 2007

I am using the 3-tiered architecture design (presentation, business laws, and data acess layers). I am stuck on how to send the image the user selects in the upload file control to the BLL and then to the DAL because the DAL does all the inserts into the database. I would like to be able to check the file type in the BLL to make sure the file being uploaded is indeed a picture. Is there a way I can send the location of the file to the BLL, check the filetype, then upload the file and have the DAL insert the image into the database? I have seen examples where people use streams to upload the file directly from their presentation layer, but I would like to keep everything seperated in the three classes if possible. I also wasn't sure what variable type the image would be in the function in the BLL that receive the image from the PL. If there are any examples or tips anyone can give me that would be appreciated.

View 2 Replies View Related

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 View Related

SQL Server 2012 :: Using User Defined Function In View?

Jan 31, 2014

I have a function that accespts a string and a delimeter returns the results in a temp table. I am using the funtion for one of the columns in my view that needs be to split and display the column into different columns. The view takes for ever to run and finally it doesn't split and doesn't display in the column.

Function:
-----------------------------------
ALTER FUNCTION [dbo].[func_Split]
(
@DelimitedString varchar(8000),

[Code].....

Not sure what I am missing in the above view why it doesn't split the string.

View 8 Replies View Related

SQL Server 2012 :: Find Names Of Tables For A Particular User

Feb 18, 2015

how to find the names of the tables owned by the particular user in sql server and how to display the distinct object types owned by the particular user.

View 1 Replies View Related

SQL Server 2012 :: Keep Only Top 50 Records For Every User And Delete Remaining

Aug 4, 2015

I have a table 'library' with two columns

user_name, access_time

every user is having more than 500 entries, i want to keep only top 50 records for every user and delete the remaining records.

View 9 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







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