MkhProgrammer Level: Big Cheese
 Registered: 06-09-2003 Posts: 26
|
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
|