|
-
May 13th, 2010, 10:53 AM
#1
VB.net 64bit problem?
I have just changed to a new 64bit computer so of course my oledb.4.0 calls dont work and I have replaced them with Ace.oledb.12.0 and that seems to work fine I can preview the data. However a simple program which worked fine befrore in 32bit keeps throwing an error
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
The program is very simple
in Design view I have a designgridview, ListBindingSource, listTableAdapter & my dataset.xsd
I can rightclick the ListTableApapter and preview the data fine.
My code is just
Public Class List2
Private Sub List2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ListTableAdapter.Fill(Me.STT_phonelistDataSet.List)
End Sub
End Class
At design time I can preview the data in the DatagridView so all the data sources must be set ok. But when I run the program I get the error and the Grid is empty
Any ideas why?
Perhaps I should also mention thaqt I'm using 2010 express but the previous working version was in 2008 express
-
May 13th, 2010, 12:18 PM
#2
Re: VB.net 64bit problem?
The form isn't LOADED, so you can't FILL the grid. Use a different event.
In Net you can use the Form PAINT event, which is where you draw to the screen.
Don't fill the adapter every screen refresh. Use code to CHECK if it's nothing!
Or add some Initialization() code.
-
May 14th, 2010, 02:50 AM
#3
Re: VB.net 64bit problem?
I tried other events with no difference, and since this is my startup form it must load (certainly the code steps through)
I think the problem is to do with the fact that I'm rumnning 64bit but my database is on a server running 32bit
I found the following but dont understand where this setting is
Since IIS is in control of the process bitness, the solution in my case was to set the Enable32bitAppOnWin64 setting to true: http://blogs.msdn.com/vijaysk/archiv...me-server.aspx
-
May 14th, 2010, 08:25 AM
#4
Re: VB.net 64bit problem?
What OS are you running now and before?
You say you are running a 64 bit computer [pretty much all computers are 64 bit now] but you do not say what OS you are running or what you were running before.
Always use [code][/code] tags when posting code.
-
May 15th, 2010, 10:20 AM
#5
Re: VB.net 64bit problem?
Are you using ASP.Net for a web app? I have a SQL2005 instance at my web host. My schedule program works by connecting to it. It is a windows forms app (DevExpress).
Allows shared contacts and schedule, without needing Exchange Server
-
May 16th, 2010, 02:53 PM
#6
Re: VB.net 64bit problem?
see if this can help:
http://social.msdn.microsoft.com/For...b-acc8b0a5a091
The setup for Visual Studio has to be changed to "x86" from "AnyCPU".
Last edited by Cimperiali; May 17th, 2010 at 06:15 PM.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
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
|