|
How to upload .docx file using ASP?
When I use windows vista (Installed MS office 2007) using normal ASP code, it don't allow me to upload .docx file in sql server database to store in "Image" field.
Error comes with "OLEDB" restrictions.
The same code allows me with machine (OS Windows xp/vista) have lower version of MS Office 2000/2003/xp (not MS office 2007). And I am also not able to open it, because it stores the MIME type "application/x-zip-compressed"...and opens in ZIP format.
Please any one can help for this kind of problem.
Kind Regards,
Madhusudan KUshwaha
|
|
|
|
|
What is the error message that you get?
|
|
|
|
|
Thanks to reply my query.
I am getting this error with classic method using "ABCUPLOAD4" dll, however i am getting the data in "Image" type field of sql server database.
Error 1:
Microsoft OLE DB Provider for SQL Server error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
|
|
|
|
|
|
yes, i got the same solution while googling...but is it related to ABCUPLOAD dll version ?
|
|
|
|
|
Hi all,
This is my first post here.
I have this question and hoped that some of you Gurus could help me in getting a solution.
I have this function (dhInicia_aux) that runs when the readyState == 'complete'.
As you can see it as a css.addrule, after doing the code i realized that what i really needed was to add an entire css file into the stylesheet object, instead of just making addRules 'ad eternum' any solution from you guys?
Thanks in advance,
Luis Figueira
function dhInicia_aux() {
try {
var css = document.getElementById('dhEdit').contentWindow.document.createStyleSheet();
css.addRule(".gctitulo", "font-family:arial;font-size:1.2em;font-weight:bold;color:#54585D;");
document.getElementById('dhEdit').contentWindow.document.body.style.margin = '5px';
document.getElementById('dhEdit').contentWindow.document.body.style.fontFamily = 'arial';
document.getElementById('dhEdit').contentWindow.document.body.style.fontSize = dhTamanhoFonte + "pt";
document.getElementById('dhVistaHtml').style.fontSize = dhTamanhoFonte + "pt";
document.getElementById('dhVistaHtml').style.fontFamily = 'arial';
document.getElementById('dhVistaHtml').style.color= "#0000FF";
}
|
|
|
|
|
lbfigueira wrote: what i really needed was to add an entire css file into the stylesheet object,
|
|
|
|
|
i open a windows form from flase i want this form to be in the center of the Screen
merwa
|
|
|
|
|
|
merwa wrote: flase
Did you mean flash?
If yes, then you can try using ActionScript right?
merwa wrote: open a windows form
You can use window.open .
merwa wrote: center of the Screen
You can use moveTo .
-- modified at 8:34 Thursday 23rd August, 2007
|
|
|
|
|
I have noticed that on some sites you can browse your machine for path to files you want to upload to the website.
Attachments for webmail is an example. You click a button and a dialog is presented so you can search for and select the file you want to upload.
Is there a way of doing this in javascript?
What considerations need to be considered with different client operating systems (win, mac, *nix)?
|
|
|
|
|
Not really a javascript expert so can't answer all yuor quesitons definitively, but google the "javascript fileupload object" for what you want - you can certainly select the files this way, to upload them you'll need make an ajax call or similar. It ought to work across all major browsers adn OS's.
Fred
|
|
|
|
|
Thanks for the info. The javascript fileupload object is just what I need.
|
|
|
|
|
|
Thanks for the links. The stickman article is what I needed.
|
|
|
|
|
When you have a OBJECT tag that needs to be populated by a dynamic SWF. If for some chance, the SWF could not be streamed and results in a 404, then Internet Explorer seems to be eternally requesting the page as is deduced from the Status bar "Opening page ....'
Here are my questions:
1) Any defined timeouts that Internet Explorer or its ActiveX Flash objects follow?
2) Any standard mechanism to adopt in this inline. The other workaround being hit a XmlHttp and get a status code like 200 to proceed with this SWF filling.
|
|
|
|
|
hey,
i've got a webservice with one webmethod. if an exception occurs in this method, i'd like to throw it (and transport it back to the client) as a SoapException . my code looks somewhat like this:
[WebMethod]
public News[] GetLatestNews(string subscriberKey, int count, string languageName)
{
try {
}
catch (Exception ex)
{
string msg = "Internal Server Error: " + ex.Message;
string actor = HttpContext.Current.Request.Url.AbsoluteUri;
XmlNode details = BuildDetails(actor, ERR_SERVERERROR, msg);
throw new SoapException(msg, SoapException.ServerFaultCode, actor, details);
}
}
the method BuildDetails creates an XmlNode with some error information (as you can probably guess by looking at the signature).
my problem is: when i start debugging the webservice, the page i get when i invoke the method shows only the error message. without any xml around it. but i'd like to have a proper xml-return which contains all of the information i've placed into the SoapException .
what am I missing here? thanks in advance.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
I haven't used a soapException before, but often in my webservices I pass out a ref string error. If it is not blank then I got an error. That seems to have worked pretty good for me.
Ben
|
|
|
|
|
Looks at the documentation, like I said before I haven't used soapexception. It seems that the xml is only there if you put it there.
public class ThrowSoapException : WebService
{
[WebMethod]
public void myThrow(){
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
System.Xml.XmlNode node = doc.CreateNode(XmlNodeType.Element, SoapException.DetailElementName.Name, SoapException.DetailElementName.Namespace);
System.Xml.XmlNode details = doc.CreateNode(XmlNodeType.Element, "mySpecialInfo1", "http://tempuri.org/");
System.Xml.XmlNode detailsChild = doc.CreateNode(XmlNodeType.Element, "childOfSpecialInfo", "http://tempuri.org/");
details.AppendChild(detailsChild);
System.Xml.XmlNode details2 = doc.CreateNode(XmlNodeType.Element, "mySpecialInfo2", "http://tempuri.org/");
XmlAttribute attr = doc.CreateAttribute("t", "attrName", "http://tempuri.org/");
attr.Value = "attrValue";
details2.Attributes.Append(attr);
node.AppendChild(details);
node.AppendChild(details2);
SoapException se = new SoapException("Fault occurred", SoapException.ClientFaultCode,Context.Request.Url.AbsoluteUri,node);
throw se;
return; }
}
Ben
|
|
|
|
|
hey kubben,
thanks for your reply. yes, i knew this already. but i've copy-pasted your code above into my project, just in case i missed something. the same result. the only return i get is the literal: "Fault occurred".
i need to return a properly formatted soap response with a couple of details concerning the error? i was already wondering, if IE is "eating" the soap message and reducing it to this simple string. but it seems my IE settings are ok.
kind regards
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
You know looking at the overloads for the create of the soapException, I can find one that matches what you are passing in. I am thinking perhaps that is the problem? The only overloads with four parameters are:
public SoapException (
string message,
XmlQualifiedName code,
string actor,
XmlNode detail
)
public SoapException (
string message,
XmlQualifiedName code,
string actor,
Exception innerException
)
So I think that is where you need to look.
Ben
|
|
|
|
|
but the first one matches the code i've posted:
throw new SoapException(msg, SoapException.ServerFaultCode, actor, details);
regards, matthias
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
I think that SoapException.ServerFaulCode is not a XmlQualifiedName.
An XML qualified name is a namespace qualified local name in the format of namespace:localname.
Because prefixes are only required when XML is persisted or read, they are irrelevant for XmlQualifiedName objects. This class assumes that prefixes are irrelevant. It is the responsibility of the user to ensure the local name does not contain a ":".
Ben
|
|
|
|
|
Then again, I am wrong. Sorry about that.
Ben
|
|
|
|
|