|
-
Sep 30th, 2008, 05:54 PM
#1
Thread Starter
New Member
[Resolved]Visual Studio database error
Hello,
I'm just learning database programming in visual basic 2005 and I'm getting an error when I run my application. I'm not doing anything fancy, I didn't even write any code I just imported an access database into the solution and dragged the one table it contains onto the form. The Datagridview and all the appropriate associated controls load fine but when I try to run it I get an error in the immediate window and the gridview is blank. There error is:
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
I'm able to edit the gridview but for some reason it will not load what's in the database. This happens in visual studio 2005 and 2008 on Vista 64bit. I tried with the same database on an XP computer and it works fine in both 2005 and 08. Then I tried just creating a sample database with only a few records, same result. Works on XP but not in Vista.
I thought maybe it was a problem with permissions because when I start VS I get the dialog saying that some features may not work properly without administrative privileges. I have administrator privileges already but I checked always run as administrator anyway which did not solve the problem.
I have a feeling it's got more to do with Vista than it does with the Access database or Visual Studio, but it's worth a shot asking around here.
Thanks,
dcritelli
**Update: The problem was that I'm running on 64bit Vista. I needed to go into the project settings and specifically tell the solution to run as a 32bit application and it works as expected now. Here is a link to where I found the explanation.
Last edited by DCritelli; Oct 1st, 2008 at 10:49 AM.
Reason: Resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|