<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBA connection ms.access vs AutoCAD (subscript out of range) in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693815#M5695</link>
    <description>&lt;P&gt;Have you set a breakpoint and stepped through the code to see where the error is coming from?&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 14:17:52 GMT</pubDate>
    <dc:creator>Ed__Jobe</dc:creator>
    <dc:date>2019-03-29T14:17:52Z</dc:date>
    <item>
      <title>VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693507#M5694</link>
      <description>&lt;P&gt;In the past i was allways use this vba file to make connection to ms.access database.&lt;/P&gt;
&lt;P&gt;But on some reason it give me now connection error with "subscript out of range"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Sub Class_Initialize()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error GoTo errInit&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoConnection = New ADODB.Connection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoRC = New ADODB.Recordset&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; With adoConnection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Open "Provider=Microsoft.JET.OLEDB.12.0;Data Source=" &amp;amp; "E:\TEST\Info64.accdb"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisDrawing.SelectionSets("KADER").Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objSSet = ThisDrawing.SelectionSets.Add("KADER")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;BR /&gt;errInit:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox err.Description, vbCritical, "Ado Connection"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoConnection = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoRC = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.Raise err.Number, Me, err.Description&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 12:25:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693507#M5694</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-29T12:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693815#M5695</link>
      <description>&lt;P&gt;Have you set a breakpoint and stepped through the code to see where the error is coming from?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:17:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693815#M5695</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2019-03-29T14:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693882#M5696</link>
      <description>&lt;P&gt;You need to tell which OS (Windows) version and which AutoCAD version that worked BEFORE and the versions of OS/AutoCAD where the code stops working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, since you are connecting to *.accdb file (Access2007 or later), are you sure the DB drive in the connectionstring is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Provider=Microsoft.&lt;FONT color="#FF0000"&gt;JET&lt;/FONT&gt;.OLEDB.12.0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;not&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Provider=Microsoft.ACE.OLEDB.12.0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;???&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AFAIK, there is no "Microsoft.Jet.OLEDB12.0", rather the latest provider to Jet Engine is "Microsoft.Jet.OldDb.4.0", which no longer comes with later Windows OS (Win7 or later).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you connect to *.accdb, the provider should be "Microsoft.ACE.OleDb.12.0". If you are using 64-bit AutoCAD, you need to either install 64-bit MS Access, or 64-bit MC Access DB Engine (free download), which is replacement to old Jet Engine.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:39:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693882#M5696</guid>
      <dc:creator>Norman_Yuan</dc:creator>
      <dc:date>2019-03-29T14:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693986#M5697</link>
      <description>&lt;P&gt;I using windows7 64bit, microsoft access 64bit and autocad201864bit.&lt;BR /&gt;before i was using access32bit and autocad2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have no idea what happend and why it not working anymore?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:15:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8693986#M5697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-29T15:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8694134#M5698</link>
      <description>&lt;P&gt;I assume that your computer (or any computer that runs the VBA code) had MS Access installed when it worked with AutoCAD 2015 (it must also have been 32-bit).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that you are using 64-bit AutoCAD, and its VBA now is also 64-bit, you MUST use MS Access DB Engine 64-bit. If you have 64-bit MS Office/MS Access installed, then you should be OK. However, in most cases with MS Office and/or MS Access installation, 32-bit MS apps are installed. Thus, you need to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Change your MS Office suite/MS Access to 64-bit, which would get MS Access DB Engine installed.&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;2. Download and install 64 bit MC Access DB Engine (co-existing with 32-MS Office/Access app). This would be tricky, to say the least. You can search the net for how to install 64 MS Access DB Engine with MS Office suite 32bit co-existence.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMO, 1 would be easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other option is to move away from using Access DB for data storage to avoid the troublesome co-existence of 64-bit DB engine and 32-bit MS office suite issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, in the code's ConnectionString, the provider should be "Microsoft.ACE.OLEDB.12.0".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you search this forum, you would find quite a few discussions on this topic in the past when people stated using 64-bit AutoCAD.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:55:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8694134#M5698</guid>
      <dc:creator>Norman_Yuan</dc:creator>
      <dc:date>2019-03-29T15:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8695610#M5699</link>
      <description>&lt;P&gt;Does anyone can give me an example how it works now with 64bit how i can connected to an ms.access database.&lt;/P&gt;
&lt;P&gt;if i know what code i need to use to make this connection i can fix mine program but now it doesnt work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Sub Class_Initialize()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error GoTo errInit&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoConnection = New ADODB.Connection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoRC = New ADODB.Recordset&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; With adoConnection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Open "Provider=Microsoft.JET.OLEDB.12.0;Data Source=" &amp;amp; "E:\TEST\Info64.accdb"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisDrawing.SelectionSets("KADER").Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objSSet = ThisDrawing.SelectionSets.Add("KADER")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;BR /&gt;errInit:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox err.Description, vbCritical, "Ado Connection"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoConnection = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set adoRC = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.Raise err.Number, Me, err.Description&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 12:18:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8695610#M5699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-30T12:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: VBA connection ms.access vs AutoCAD (subscript out of range)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8696585#M5700</link>
      <description>&lt;P&gt;I am not sure if you have read my previous reply or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before anyone can give any suggestion on the code itself, you need to tell:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DO YOU HAVE MS ACCESS 64-bit INSTALLED; OR DO YOU HAVE MS ACCESS DB ENGINE 64-bit INSTALLED? If not, it is not code issue (although there is code error as I pointed out).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 12:52:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-connection-ms-access-vs-autocad-subscript-out-of-range/m-p/8696585#M5700</guid>
      <dc:creator>Norman_Yuan</dc:creator>
      <dc:date>2019-03-31T12:52:58Z</dc:date>
    </item>
  </channel>
</rss>

