|
check your 'clsUploadToMoss' class visibility(internal, public or private), and where you call your class
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
READ THE ENTIRE THREAD. This suggestion was made almost 5-1/2 hours ago.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
sorry for my mistake
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Hi
I have used an ErrorProvider in my form, and it works truly, but when I run my project, after fixing the error of the textbox input, the errorprovider icon still exists and blinking. how the error icon disappears after fixing the error?
|
|
|
|
|
you have to clear the Error String via SetError:
errProvider.SetError (this, "");
|
|
|
|
|
Well, to clarify further, you would re-verify the validity of the field, and if it was ok then you would "SetError" to ""
|
|
|
|
|
Dear all,
I have compressed files in a SharePoint Library through a SharePoint's Feature into another Library. Say the name of the first library is "My Document Store" and the library where the feature stores the documents after compressing is "Compressed Document Store". The feature runs after a specific time. Now the feature is working fine, I am using "System.IO.Compression" library to compress the documents. Secondly, i have made a webpart, which displays the compressed document list. What i want to do is when a user clicks on a compressed document, the document should be uncompressed on the fly and should become downloadable to the user. But the point where i am stuck is, when i try to decompress the document, i.e,
use
any
stream
GZipStream zip = new GZipStream(fs, CompressionMode.Decompress, true);
int fileSize = zip.Read(buffer, 0, (int)buffer.Length);
zip.Write(buffer, 0, (int)buffer.Length);
zip.Flush();
I get the error : Writing to the compression stream is not supported.
What should i do now ?
This code is in the aspx file, the file can be seen here.http://www.drivehq.com/file/df.aspx/publish/Tamour/wwwhome/do.aspx[^]
note: The name of the file clicked is passed as parameter to do.aspx.
i have read the following forum http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=235208&SiteID=1[^]
Note: Features in SharePoint are actually the services like services in windows.
thanx in advance,
please help me,
im stuck in my project.
|
|
|
|
|
tamour wrote: GZipStream zip = new GZipStream(fs, CompressionMode.Decompress, true);
How can you decompress and write at the same time? You need to compress.
|
|
|
|
|
Can you please pin point the exact error by describing or editing the few lines of code.
|
|
|
|
|
How about CompressionMode.Compress ?
|
|
|
|
|
I told ya, I have already compressed the document, i want to decompress them now.
|
|
|
|
|
Well then you must read from the compressed stream.
|
|
|
|
|
Thankyou Very much dear. I made it worked but not without ur help.
|
|
|
|
|
Looking at you code snippet again. There is something wrong with your logic. How can you read and write to the same stream?
You should read from the SPFileStream and write to GZipStream that be wrapping the FileStream or MemoryStream.
Hope this helps.
|
|
|
|
|
Why are you trying to write to the stream that you are decompressing. You should read from the GZipStream (zip) and write to the destination stream (fs).
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
GZipStream zip = new GZipStream(fs, CompressionMode.Decompress, true);
int fileSize = zip.Read(buffer, 0, (int)buffer.Length);
zip.Write(buffer, 0, (int)buffer.Length);-->YOUR ERROR GOES HERE
zip.Flush();
1. create a stream to buffer decompressed bytes
2. write bytes from read result in zip.Read(...) to the stream above
3. you will have a decompressed stream as result
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Thankyou very much Dhaim. Without ur halp specially, i wouldnt have done this.
|
|
|
|
|
Hi,
How can I reach database relation diagram of sql by using smo? I want to learn parent key table of any column if that column is foreign key.
Forexample, in northwind database, in products table, there is categoryid column. This column is related to id in Category table. I want to find this.
Best Regards
THANKS
|
|
|
|
|
omegazafer wrote: How can I reach database relation diagram of sql by using smo?
Not possible.
omegazafer wrote: I want to learn parent key table of any column if that column is foreign key.
Very possible
You do not need SMO for this. Look at calling one or both of the following stored procedures:
sp_foreignkeys
sp_primarykeys
|
|
|
|
|
Thanks,
But I don't need only foreign key or primary key columns. The table that the column ,which is foreign key , is related. For example, I search the categoryId column for this in Product table. The result wanted is Category table.(I mention on NorthWind Database)
Best Regards
|
|
|
|
|
Did you read the docs on those 2 store procedures?
|
|
|
|
|
Sp_foreign keys gives only foreign key column . I don't need only these as I said before. If it is possible , can you reply my sample question ?
Have a good day
Kemal Akkanat
|
|
|
|
|
Look at the source of this article[^]. I wrote it many many years back, and AFAIK I used those procs. You can get all the info you need.
|
|
|
|
|
omegazafer wrote: How can I reach database relation diagram of sql by using smo
You can't, and you don't need to. Have a look at my article aboutr smo, it should put you on the right track to get the details you want - although there are also non-smo methods.
http://www.codeproject.com/KB/cs/smo.aspx[^]
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks for you reply,
I looked at your article but I didn't understand. Can you explain a little more?
Have a good day
|
|
|
|