SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Using an ASP


Using an ASP

Author
Message
jayoub
jayoub
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1289 Visits: 586
I am a total newbie and have a question to ask. I am the only DBA on a team managing several SQL servers and we have a new project that require the creation of a CVS flat file.

I was give a note pad document with ASP script and (here is the crazy part) I don’t know what to do with it.

What’s also weird is that the DBA that gave it to me said it’s a very old version of ASP that it was done in and at the top of the script it says

<%@ language="vbscript" %>
<!--#include file="Connections/connSecurity.asp" -->
<%

Also a user needs to enter a start and end date and can enter SSN to get specific info.

Is there a way to implement Report Server to generate CVS Flat files and maybe use this script
Can i design this using Report Server alone.

Please let me know. Your help is appreciated.

Jeff
Lowell
Lowell
SSC Guru
SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)

Group: General Forum Members
Points: 69720 Visits: 40917
jayoub1 (5/17/2013)
I am a total newbie and have a question to ask. I am the only DBA on a team managing several SQL servers and we have a new project that require the creation of a CVS flat file.

I was give a note pad document with ASP script and (here is the crazy part) I don’t know what to do with it.

What’s also weird is that the DBA that gave it to me said it’s a very old version of ASP that it was done in and at the top of the script it says

<%@ language="vbscript" %>
<!--#include file="Connections/connSecurity.asp" -->
<%

Also a user needs to enter a start and end date and can enter SSN to get specific info.

Is there a way to implement Report Server to generate CVS Flat files and maybe use this script
Can i design this using Report Server alone.

Please let me know. Your help is appreciated.


wow I have more questions than answers for you, sorry:
Generally a DBA will use SQLCMD.exe, BCP.exe, SSIS or maybe a custom CLR to export data to disk, whehter it's csv,tsv or some other format.

A developer might write code or a web page to do the same thing, but one step removed from the data.

Why do you need to use an asp page to do it, instead of the tools a DBA would typically use?

Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
jayoub
jayoub
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1289 Visits: 586
Thank you very much for replying
The reason I would not be able to use these tools is that the user needs to be able to enter a start date, end date and SSN number to generate the report. The use must be able to access the report any time they want. I don’t think the users have access to these tools.
I spoke to a developer after posting and he said that you would need to change the file to .asp and then place it on a web server that the user can access. He said that the script would need to be modified with the correct connection string and table and field references before it would work.
Aside from the developers creating a program I need a solution that a user can generate a CVS file and the specs for the output are as follows:
Example:
Position 0-9 = SSN
Position 10-22 = First Name
Position 23-35 = Last name
Position 36- … = …

Do you know if report server will do the job. I know I can write the query to extract the data, but the users must be able to generate it and it must be delivered as a CVS

Your help is appreciated.

Jeff
Sean Lange
Sean Lange
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60901 Visits: 17954
jayoub1 (5/18/2013)
Thank you very much for replying
The reason I would not be able to use these tools is that the user needs to be able to enter a start date, end date and SSN number to generate the report. The use must be able to access the report any time they want. I don’t think the users have access to these tools.
I spoke to a developer after posting and he said that you would need to change the file to .asp and then place it on a web server that the user can access. He said that the script would need to be modified with the correct connection string and table and field references before it would work.
Aside from the developers creating a program I need a solution that a user can generate a CVS file and the specs for the output are as follows:
Example:
Position 0-9 = SSN
Position 10-22 = First Name
Position 23-35 = Last name
Position 36- … = …

Do you know if report server will do the job. I know I can write the query to extract the data, but the users must be able to generate it and it must be delivered as a CVS

Your help is appreciated.


As Lowell stated previously there just isn't enough information here to provide much help. We can't see your screen, we don't know the project and we are not familiar with the data structures.

I suppose you could create an asp page to capture the parameters (SSN, dates, etc) and have that page call your stored proc. I would agree with Lowell that a CLR is probably a good candidate here. Have your proc generate the file, return it to your asp page and then send the file as an attachment in the header.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
ssimmons 2102
ssimmons 2102
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1082 Visits: 287
Why not just use MS SQL Reporting Services or Crystal reports (what ever you reporting tool is) to generate a report, you can have input parameters, the report can use a SQL query as the source.. The results can be exported as a csv, as well as other formats. Generating a ASP page seems to be overkill.
jayoub
jayoub
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1289 Visits: 586
Thank you very much for the help

I researched and found out that Report Server will generate the CVS file, so I will spin up an report server instances and begin creating the report.

Again thanks for the help

Jeff
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search