Ask a Question related to ASP Database, Design and Development.
-
Kris Eiben #1
Re: Downloading a recordset
You can pull the whole recordset into a variable using rs.GetString(),
formatted as .csv if you want. This example pulls in a recordset as a
table, but you can pretty easily convert to a .csv file:
[url]http://www.learnasp.com/learn/dbtablegetstring.asp[/url]
"Mitchell Nussbaum" <nussbm@dnr.state.wi.us> wrote in message
news:eGSwYJGWDHA.652@tk2msftngp13.phx.gbl...recordset and> I have an .asp application that retrieves a table into an ADOthe> retrieves it as an HTML table.
>
> I would like to give users the option of downloading the contents offound> recordset as a .csv file, but I can't figure out how to do that. I'vethe> examples of code that download pre-existing files from the server toserver if> desktop, but I'd prefer not to have the script write a file on thesend> possible. So I'd like to construct the .csv records line by line, andproblem?> them to a specified file on the client machine.
>
> Is there a way to do this? Or is there some other solution to my
Kris Eiben Guest
-
Help with downloading
When downloading the scren says that i may need to click on the gold bar on the top of the browser screen to allow the download to complete, i am... -
Help before downloading
I would like to know before I download, I am making a fan club site for my friend, and I want to add a music player (like the ones on myspace... -
Not Downloading
I have been unable to download Flash player, please help. -
RecordSet.Move or RecordSet.AbsolutePosition??
Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to... -
downloading a .gif
Hello, I have a page with lots of thumbnails of photos. I want the user to be able to dload a big version of the photo (also present on the... -
Ray at #2
Re: Downloading a recordset
Just at first thought without thinking about the code, I'd probably create
my recordset, use GetString to delimit the columns by , and the rows by
vbCrLf, and then either write that to a file with the FSO and redirect to
it, or stream the file back to the user in an adodb.stream.
If you get stuck on the code, post back.
Ray at work
"Mitchell Nussbaum" <nussbm@dnr.state.wi.us> wrote in message
news:eGSwYJGWDHA.652@tk2msftngp13.phx.gbl...and> I have an .asp application that retrieves a table into an ADO recordsetfound> retrieves it as an HTML table.
>
> I would like to give users the option of downloading the contents of the
> recordset as a .csv file, but I can't figure out how to do that. I'veif> examples of code that download pre-existing files from the server to the
> desktop, but I'd prefer not to have the script write a file on the serversend> possible. So I'd like to construct the .csv records line by line, and> them to a specified file on the client machine.
>
> Is there a way to do this? Or is there some other solution to my problem?
>
> Mitch Nussbaum
> Wisconsin Dept of Natural Resources
> [email]Mitch.Nussbaum@dnr.state.wi.us[/email]
>
>
>
Ray at Guest
-
Mitchell Nussbaum #3
Re: Downloading a recordset
"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote in message
news:OFclJPGWDHA.892@TK2MSFTNGP10.phx.gbl...Thanks for this suggestion. I incorporated GetString in my code, and it's> You can pull the whole recordset into a variable using rs.GetString(),
> formatted as .csv if you want. This example pulls in a recordset as a
> table, but you can pretty easily convert to a .csv file:
> [url]http://www.learnasp.com/learn/dbtablegetstring.asp[/url]
really neat. Actually, I'd seen documentation for GetString before, but I
didn't pay much attention, since, at the time, it didn't look like something
I could use.
But I do have a problem with GetString for this particular application.
Some of the values I retrieve have embedded commas, which Excel sees as a
column delimiter when it reads a .csv file. So some values split into
multiple cells. When I create a .csv format row-by-row with my own code, I
enclose string values in quotes to keep values from splitting. Is there a
way to force GetString to do the same?
>
> "Mitchell Nussbaum" <nussbm@dnr.state.wi.us> wrote in message
> news:eGSwYJGWDHA.652@tk2msftngp13.phx.gbl...> recordset and> > I have an .asp application that retrieves a table into an ADO> the> > retrieves it as an HTML table.
> >
> > I would like to give users the option of downloading the contents of> found> > recordset as a .csv file, but I can't figure out how to do that. I've> the> > examples of code that download pre-existing files from the server to> server if> > desktop, but I'd prefer not to have the script write a file on the> send> > possible. So I'd like to construct the .csv records line by line, and> problem?> > them to a specified file on the client machine.
> >
> > Is there a way to do this? Or is there some other solution to my
>
>
Mitchell Nussbaum Guest
-
Bullschmidt #4
Re: Downloading a recordset
Puzzle 5 Not much different from other solutions by Manohar Kamath
posted 1/12/99
[url]http://www.asp101.com/puzzles/puzzle5_s7.asp[/url]
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
[url]http://www.Bullschmidt.com[/url]
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest



Reply With Quote

