473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

LoadPicture - problem!

Hello!

I've created a PDF report and trying to load a picture using
LoadPicture fucntion. It works fine on my computer but it gives an
error on some other computers - permision denied, or something similar.

Code:
----------
Dim myImg, fs
Set fs= Server.CreateObject("Scripting.FileSystemObject")
if not fs.fileExists(img) then exit sub
set myImg = loadpicture(img)
iWidth = round(myImg.width / 26.4583)
iHeight = round(myImg.height / 26.4583)
----------

File is found but when trying to load I get something like permision
denied.

img =
Server.MapPath("../../../")&Session("IG").getValue("UploadDir")&arr(30, i),"/","\")

Application is not stored in a directory different by the IIS's Home
directory. I have a virtual directory for accessing the application, I
don't know if this influences in some way.

Dec 21 '06 #1
5 4785
some web hosts won't allow this type of folder reference :

"../../../"
"Iulian Ilea" <iu*********@gmail.comwrote in message news:11**********************@f1g2000cwa.googlegro ups.com...
Hello!

I've created a PDF report and trying to load a picture using
LoadPicture fucntion. It works fine on my computer but it gives an
error on some other computers - permision denied, or something similar.

Code:
----------
Dim myImg, fs
Set fs= Server.CreateObject("Scripting.FileSystemObject")
if not fs.fileExists(img) then exit sub
set myImg = loadpicture(img)
iWidth = round(myImg.width / 26.4583)
iHeight = round(myImg.height / 26.4583)
----------

File is found but when trying to load I get something like permision
denied.

img =
Server.MapPath("../../../")&Session("IG").getValue("UploadDir")&arr(30, i),"/","\")

Application is not stored in a directory different by the IIS's Home
directory. I have a virtual directory for accessing the application, I
don't know if this influences in some way.

Dec 21 '06 #2

"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
some web hosts won't allow this type of folder reference :

"../../../"

It's called a parent path, by default IIS6 disables the use of parent paths.
Rather than enable this 'feature' use an absolute path instead.
Dec 22 '06 #3
please respond to the person who asked the question, not to the person who already provided the answer
"Anthony Jones" <An*@yadayadayada.comwrote in message news:u7****************@TK2MSFTNGP03.phx.gbl...
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
>some web hosts won't allow this type of folder reference :

"../../../"


It's called a parent path, by default IIS6 disables the use of parent paths.
Rather than enable this 'feature' use an absolute path instead.


Dec 30 '06 #4

"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
please respond to the person who asked the question, not to the person who
already provided the answer
>
Please don't top post. Please don't do this and please don't do that.
Sheesh!

Dec 31 '06 #5
I said nothing about top posting .. actually I prefer it.
"Anthony Jones" <An*@yadayadayada.comwrote in message news:uZ**************@TK2MSFTNGP04.phx.gbl...
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
>please respond to the person who asked the question, not to the person who
already provided the answer
>>

Please don't top post. Please don't do this and please don't do that.
Sheesh!

Dec 31 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: KBrq | last post by:
I use an ActiveX control that accepts a StdPicture in some of it's properties. My question is: how do I load a bitmap from a file and get a StdPicture out of it. In VB6.0 I used LoadPicture. Is...
117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
3
by: cullens_aust | last post by:
Can anyone help me with this code for vb I am trying to access different pictures at different times Dim pic As String Static x As Integer Picture1.Visible = True 'If x = File1.ListCount...
5
by: Shelby | last post by:
Hi, when I try to use LoadPicture(myFilePath) in my vb.net project, it says "LoadPicture" is not declared. Dim pic as stdole.IPictureDisp pic = LoadPicture(myFilePath) Do I need to add any...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
1
by: samadams_2006 | last post by:
Hello, I'm using "Visual Studio 2005" and VB.NET to be more exact. I have the following article which shows me how to set the mask and picture properties for Office XP Commandbars: ...
1
by: Shinkn | last post by:
Hi I am using this code in Excel to display an ID image based on the ID number. Code also checks the expiry date of the ID and diplays a message. Everything works properly except that message box...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.