PDA

Click to See Complete Forum and Search --> : [RESOLVED][1.0/1.1] Can ZipFile be done at the server side?


MetaEdgeDanny
Jun 23rd, 2007, 05:54 AM
[edited]
Hi, I'm a C# newbie, but I need help with the following:

Background: I am working in a group of .NET programmers and T-SQL programmers. I would like to help out our main programmer in an upcoming task. Which we need to first generate SQL codes from a report service, split the code up into different procedures so it may be viewed individually, but also need to compress (or just combine) the file up into 1 file so the users may download them all at a time.

I understand this is a long process and won't want you guys to do it all for me. Like I said, I'm a C# newbie, I only know some VB and VBA. Here's what I got

1. The server is similiar to our computer, so the generating SQL codes from a report should be as simple as extract it from Access.

2. The generated SQL codes can be saved as .doc files, opened up with Word then thru macros, it can be split up into multiple piece as either .txt or .doc.

3. With ZipFile in .NET Framework 2.0, I can combine these file in my computer
ZipFile zip= new ZipFile("MyNewZip.zip");
zip.AddDirectory("My Pictures", true);
zip.Save();

I don't have all the codes figure out yet, but I know I can do this on my computer with little bit of research. However, I was hoping if anyone know of any sites/links that have example of doing this at the server side?

My guess is that I would have to figure these codes, then I would have to input them into .ASP/html codes by calling C#/VBScripts objects within them to do these.

Can anyone at this point tell me if I would be doing this correctly? or is there a faster route? examples or anything?

ComputerJy
Jun 23rd, 2007, 06:49 AM
It's doable and Server side means code behind (C#, VB, Java... etc).
And if you are looking for someone to do this for you. Rent a coder (https://www.rentacoder.com/RentACoder/default.asp)

MetaEdgeDanny
Jun 23rd, 2007, 09:56 PM
:( What's the fun if I get a coder to do the coding... thx anyway. If anyone know of any site that discuss anything about this, please tell me.

Thanks

ComputerJy
Jun 23rd, 2007, 10:32 PM
If anyone know of any site that discuss anything about this, please tell me.Actually that's what we do here. But I don't think anybody has much of a free time to start with you from scratch.

If you post specific questions and show that your doing your work. You'll be shocked of how much knowledge you can gain here.
We have some pretty smart guys around here ;)

MetaEdgeDanny
Jun 24th, 2007, 12:03 PM
Yup. I was here a year ago in the VB section. guys here helped me solved many major problems I had back then. However, for my current intern I'm working on C# & SQL and because I'm still new at it, I wasn't sure if things like this can be done at the server side.

I have edited my original questions above.

ComputerJy
Jun 24th, 2007, 12:13 PM
If your problem is to split text
you can use "String.Split" method

MetaEdgeDanny
Jun 24th, 2007, 12:33 PM
Well splitting isn't the hard part, the customers are giving us the conditions to split a file within a .doc, and I know the VB6.0/.NET methods, just have to figure out the C# ones. But my main problem at the moment is knowing how to use ZipFile thing (I just found out about this function in VB6.0, don't even know if there's one for C#, and still finding out more exmaple on how to use it.)

ComputerJy
Jun 24th, 2007, 12:45 PM
Oh. In that case take a look at the new Compression namespace (http://msdn2.microsoft.com/en-us/library/System.IO.Compression.aspx) in .NET 2.0

MetaEdgeDanny
Jun 25th, 2007, 01:55 AM
thx for the link. I will be looking forward to learn that soon.

it just so happen that my team decides to make it easy by looping file download #'s of times after splitting it up. This was the decision because there was authorization issue for the users to obtain file saved within the server.