.net error when querying database in VB and SQL

Hey Everyone,

I am querying certain tables in our database to retrieve info using DataGridView.  I am coding this in Studio 2005.  I am getting an error box popping up saying that

MicroSoft .NET Framework
"Application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission, contact your system administrator, or use the Microsoft .NET Framework Configuration Tool."

Then a bit further down I get

"Request for the permission of type

I am thinking this is probably in my connection string configuration because the db user is the owner of the db, so the permission error is not there I do not believe.

Who is Participating?
dstanley9Connect With a Mentor Commented:
This is not a SQL permissions error, it is a code access permissions error.  
Are you running the app from a shared drive?  Apps run from shared locations do not have permissions by default to run SqlClient code.  Eithe run the app from a local drive or give the app full trust using the .NET Configuration Tool.
Go to Table>Property>Permission and check you have all the permission like insert update exec select permission for your user
edfreelsAuthor Commented:
Thanks Guys,

It was being stored in my documents which is on the network, I moved to my desktop and it works great.  

Thanks again
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.