<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Access 2007 &amp; VB 2008' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Access 2007 &amp; VB 2008' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2010 Programmers Heaven</copyright>
    <pubDate>Mon, 15 Mar 2010 20:38:07 -0700</pubDate>
    <lastBuildDate>Mon, 15 Mar 2010 20:38:07 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Access 2007 &amp; VB 2008</title>
      <link>http://www.programmersheaven.com/mb/VBNET/408887/408887/access-2007--vb-2008/</link>
      <description>I have a real problem here.  I am connecting to an access 2007 database (accdb) via an OLEDB connection, and I have no idea why this code isn't working!&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Imports System.Data.OleDb
Public Class Form1

    Private Sub Form1_Load(...)
        Dim dbCon As OleDbConnection
        Dim dbCmd As OleDbCommand
        Dim dbRead As OleDbDataReader

        dbCon = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0
;Data Source=C:\My.accdb;Persist Security Info=False;")
        dbCon.Open()  

        dbCmd = New OleDbCommand("SELECT * FROM CITY", dbCon)
        dbRead = dbCmd.ExecuteReader
        Do While dbRead.Read
            MsgBox(dbRead(1))
        Loop
    End Sub
End Class
&lt;/pre&gt;&lt;br /&gt;
The result is the program crashes with no errors.  I tried it in a different form/project and it launches the forum without any messages. So, in short, I'm getting no error messages and I don't know why.  It will not go past dbCon.Open().  Please help!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/408887/408887/access-2007--vb-2008/</guid>
      <pubDate>Thu, 05 Nov 2009 12:52:31 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Access 2007 &amp; VB 2008</title>
      <link>http://www.programmersheaven.com/mb/VBNET/408887/409093/re-access-2007--vb-2008/#409093</link>
      <description>If the program is crashing, it has to be throwing an exception...&lt;br /&gt;
&lt;br /&gt;
to get the error message try this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Private Sub Form1_Load(...)
        Dim dbCon As OleDbConnection
        Dim dbCmd As OleDbCommand
        Dim dbRead As OleDbDataReader
try
        dbCon = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0
;Data Source=C:\My.accdb;Persist Security Info=False;")
        dbCon.Open()  
catch ex as exception
msgBox(ex.Message, vbOkOnly, "Error During dbCon.Open()")
return
End Try

        dbCmd = New OleDbCommand("SELECT * FROM CITY", dbCon)
        dbRead = dbCmd.ExecuteReader
        Do While dbRead.Read
            MsgBox(dbRead(1))
        Loop
    End Sub

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
My gut feeling is that this is a connection string issue&lt;br /&gt;
try this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Dim DBName as String = "c:\path_of_db\dbname.dbext"
Dim ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;amp; DBName &amp;amp; ";User ID=Admin;Password="

dbCon = New OleDbConnection(ConString)
&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/408887/409093/re-access-2007--vb-2008/#409093</guid>
      <pubDate>Wed, 11 Nov 2009 07:31:38 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Access 2007 &amp; VB 2008</title>
      <link>http://www.programmersheaven.com/mb/VBNET/408887/409101/re-access-2007--vb-2008/#409101</link>
      <description>Thanks!  I tested everything out, and it still didn't work.  I was looking around, and I realized that it's because first, I'm using the compiler in x64 so it can't find the provider, and second that I was using the code in the form load event, so it wouldn't throw errors.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/408887/409101/re-access-2007--vb-2008/#409101</guid>
      <pubDate>Wed, 11 Nov 2009 08:49:08 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Access 2007 &amp; VB 2008</title>
      <link>http://www.programmersheaven.com/mb/VBNET/408887/409106/re-access-2007--vb-2008/#409106</link>
      <description>Did you find a solution?&lt;br /&gt;
&lt;br /&gt;
If not, you might find a more proper connection string (that has a provider that you can see on your x64 box) here: &lt;a href="http://www.connectionstrings.com/"&gt;http://www.connectionstrings.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I go there a lot when I am writing con-strings for DB's I don't normally work with.&lt;br /&gt;
&lt;br /&gt;
Good Luck!&lt;br /&gt;
Sean Campbell - firesickle.com</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/408887/409106/re-access-2007--vb-2008/#409106</guid>
      <pubDate>Wed, 11 Nov 2009 13:30:46 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Access 2007 &amp; VB 2008</title>
      <link>http://www.programmersheaven.com/mb/VBNET/408887/409108/re-access-2007--vb-2008/#409108</link>
      <description>Yeah, thanks.  I changed the compiler to target x86 machines, and moved the code to a button event.  Thanks for the help!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/408887/409108/re-access-2007--vb-2008/#409108</guid>
      <pubDate>Wed, 11 Nov 2009 13:42:07 -0700</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>