Solved

Adodb.stream LoadFromFile not working

Posted on 2006-12-02
4
1,855 Views
Last Modified: 2008-01-09
I am trying to execute following javascript on my button's OnClientClick event, but the code in line 4 doesn't execute.
Could someone help me to find out where the problem is.

function upload2()
{
    var BinaryStream = new ActiveXObject("ADODB.Stream") //line 1
    BinaryStream.Type = 1;                                                 //line 2
    BinaryStream.Open();                                                    //line 3
    BinaryStream.LoadFromFile("d:\\temp\namrata.jpg");      //line 4
    var what = BinaryStream.Read();                                    //line 5
    BinaryStream.Close();
}
0
Comment
Question by:param4r
  • 2
4 Comments
 
LVL 17

Expert Comment

by:gops1
ID: 18059137
Add one more "\" here

BinaryStream.LoadFromFile("d:\\temp\\namrata.jpg");      
0
 

Author Comment

by:param4r
ID: 18059182
I am sorry but actual code does contains two slashes e.g.
BinaryStream.LoadFromFile("d:\\temp\\namrata.jpg");

but did not work. Please help
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 250 total points
ID: 18059473
does you browser policy (security settings) allow to read from local filesystem?
0
 

Author Comment

by:param4r
ID: 18059564
how to check that
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now