borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (how to set images in the pager of the datagrid??)Next Topic (Asp.Net and SqlServer data) New Topic New Poll Post Reply
AndreaVB Forum : ASP.Net : Asp.net & File
Poster Message
MkhProgrammer
Level: Big Cheese

Registered: 06-09-2003
Posts: 26

icon Asp.net & File

Hi

i use this code to retrieve my image field from sql server
(my file isn't picture !!!)

***********
            Dim MyData() As Byte
            MyData = Ds.Tables(mytable).Rows(0).Item(myfield) 'For Example
            Dim K As Long
            K = UBound(MyData)

            Dim fs As New FileStream("c:\mkh.xml", FileMode.OpenOrCreate, FileAccess.Write) 'in this line get error
            fs.Write(MyData, 0, K)
            fs.Close()

            fs = Nothing
            Ds = Nothing
************
but it doesn't work and give me this error in ASP.Net(With Vb)
<<Access to the path "C:\mkh.xml" is denied.>>

i get this code from microsoft msdn and alot of furoms !!!!
then why doesn't work??

____________________________
MkhProgrammer

21-10-2004 at 07:17 AM
View Profile Send Email to User Show All Posts | Quote Reply
MacD
Level: Big Cheese

Registered: 06-01-2004
Posts: 19
icon Re: Asp.net & File

hi,

Please go to the file mkh.xml and right click on it. Check its security settings. Give access permissions to the user SYSTEM.

I hope this will assist you

regards


____________________________
MacD

21-10-2004 at 10:04 AM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Asp.net & File

Have you checked that you are logged in as a user with write permissions for "C:" or that SQLServer account has such permissions.?
OOOPs - Mac beat me to the post


[Edited by GeoffS on 21-10-2004 at 10:09 AM GMT]

____________________________
multi-tasking - the ability to hang more than one app. at the same time.

21-10-2004 at 10:07 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : ASP.Net : Asp.net & File
Previous Topic (how to set images in the pager of the datagrid??)Next Topic (Asp.Net and SqlServer data) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder