<?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 Automatically Create DSN Connection in Collaboration with other software</title>
    <link>https://community.graphisoft.com/t5/Collaboration-with-other/Automatically-Create-DSN-Connection/m-p/52839#M4868</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi Everyone&lt;BR /&gt;
&lt;BR /&gt;
I have done this sort of thing with SQL Server but not with ArchiCAD&lt;BR /&gt;
&lt;BR /&gt;
What i am trying to do is import data from a pln file to an access database&lt;BR /&gt;
&lt;BR /&gt;
The import process works fine providing there is a DSN current&lt;BR /&gt;
&lt;BR /&gt;
If no then I would like to have one create automatically&lt;BR /&gt;
&lt;BR /&gt;
I am trying to use the following VB Script but keep getting prompted to start the Data Source Configuration Wizard&lt;BR /&gt;
&lt;BR /&gt;
Here is when I am stuck&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Declare Function ArchiCADConfigDataSource Lib "odbccp32.dll" _&lt;BR /&gt;
  (ByVal hwndParent As Long, _&lt;BR /&gt;
  ByVal fRequest As Integer, _&lt;BR /&gt;
  ByVal lpszDriver As String, _&lt;BR /&gt;
  ByVal lpszAttributes As String) As Long&lt;BR /&gt;
&lt;BR /&gt;
Function Connect&lt;BR /&gt;
&lt;BR /&gt;
         lngResult = ArchiCADConfigDataSource(0, _&lt;BR /&gt;
                                ODBC_ADD_SYS_DSN, _&lt;BR /&gt;
                                "ArchiCad Plan ODBC Driver v9.0.0", _&lt;BR /&gt;
                                "DSN=" &amp;amp; JDS_DSN_name &amp;amp; _&lt;BR /&gt;
                                "Description=Plans" &amp;amp; Chr(0) &amp;amp; _&lt;BR /&gt;
                                "PlanFile=C:\Test.pln" &amp;amp; Chr(0) &amp;amp; _&lt;BR /&gt;
                                "MapBigIntToInt=false" &amp;amp; Chr(0) &amp;amp; Chr(0))&lt;BR /&gt;
End Function&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 26 Sep 2005 08:48:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-09-26T08:48:29Z</dc:date>
    <item>
      <title>Automatically Create DSN Connection</title>
      <link>https://community.graphisoft.com/t5/Collaboration-with-other/Automatically-Create-DSN-Connection/m-p/52839#M4868</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi Everyone&lt;BR /&gt;
&lt;BR /&gt;
I have done this sort of thing with SQL Server but not with ArchiCAD&lt;BR /&gt;
&lt;BR /&gt;
What i am trying to do is import data from a pln file to an access database&lt;BR /&gt;
&lt;BR /&gt;
The import process works fine providing there is a DSN current&lt;BR /&gt;
&lt;BR /&gt;
If no then I would like to have one create automatically&lt;BR /&gt;
&lt;BR /&gt;
I am trying to use the following VB Script but keep getting prompted to start the Data Source Configuration Wizard&lt;BR /&gt;
&lt;BR /&gt;
Here is when I am stuck&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Declare Function ArchiCADConfigDataSource Lib "odbccp32.dll" _&lt;BR /&gt;
  (ByVal hwndParent As Long, _&lt;BR /&gt;
  ByVal fRequest As Integer, _&lt;BR /&gt;
  ByVal lpszDriver As String, _&lt;BR /&gt;
  ByVal lpszAttributes As String) As Long&lt;BR /&gt;
&lt;BR /&gt;
Function Connect&lt;BR /&gt;
&lt;BR /&gt;
         lngResult = ArchiCADConfigDataSource(0, _&lt;BR /&gt;
                                ODBC_ADD_SYS_DSN, _&lt;BR /&gt;
                                "ArchiCad Plan ODBC Driver v9.0.0", _&lt;BR /&gt;
                                "DSN=" &amp;amp; JDS_DSN_name &amp;amp; _&lt;BR /&gt;
                                "Description=Plans" &amp;amp; Chr(0) &amp;amp; _&lt;BR /&gt;
                                "PlanFile=C:\Test.pln" &amp;amp; Chr(0) &amp;amp; _&lt;BR /&gt;
                                "MapBigIntToInt=false" &amp;amp; Chr(0) &amp;amp; Chr(0))&lt;BR /&gt;
End Function&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Sep 2005 08:48:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Collaboration-with-other/Automatically-Create-DSN-Connection/m-p/52839#M4868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-26T08:48:29Z</dc:date>
    </item>
  </channel>
</rss>

