System.Security.Permissions.SecurityPermission error

G

Guest

Im trying to develop a windows form program to read and write excel sheets
But, on the begining, when I try to open the sheet, returns an
System.Security.Permissions.SecurityPermission error
The full error is:
{"Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed."} System.SystemException {System.Security.SecurityException}
The connection string is:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + File_name + ";
Extended Properties=Excel 8.0;HDR=Yes;IMEX=1";
But when the program try to open, breaks to the catch, in the try/catch
control
Any idea?
TIA
Julio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top