• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1925
  • Last Modified:

Adodb.stream LoadFromFile not working

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
param4r
Asked:
param4r
  • 2
1 Solution
 
gops1Commented:
Add one more "\" here

BinaryStream.LoadFromFile("d:\\temp\\namrata.jpg");      
0
 
param4rAuthor Commented:
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
 
ahoffmannCommented:
does you browser policy (security settings) allow to read from local filesystem?
0
 
param4rAuthor Commented:
how to check that
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now