<?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: Connect to SQL or Microsoft Access from iLogic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/10040077#M99452</link>
    <description>&lt;P&gt;Just wanted to write and say thanks for the example, it got me going in the right direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for others looking at this should know calling your variables directly in SQL commands is bad practice. For more information just google bobby tables or why you should sanitize your inputs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a modified example that uses parameters in SQL queries properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Sub Main()
	
	'SQL LINK
	Dim myConn As SqlConnection
	Dim myCmd As SqlCommand
	Dim myReader As SqlDataReader
	Dim results As String
	Dim Req As String
	Dim ReqInsert As String

	'Get previously entered StockNumber
	Dim PartNumber As String
	PartNumber = iProperties.Value("Project", "Part Number")
		
	'Definition of connection
	myConn = New SqlConnection("Data Source = SQLSERVER ;Initial Catalog = DBNAME ;User Id = USER ;Password = PASSWORD ; ")
	'query request using  as the SQL Parameter @Anonymous to pass the Inventor Paramter into the SQL query correctly
	Req = "SELECT StockCode,Description,LongDesc,ProductClass FROM InvMaster WHERE StockCode = @Anonymous"
	myCmd = myConn.CreateCommand
	myCmd.CommandText = Req
	
        'Create the SQL Parameter  and assign the Inventor Parameter PartNumber value to @Anonymous. This sanitizes the input.
	MyCmd.Parameters.Add("@PartNumber", SqlDbType.VarChar, 30).Value = PartNumber
	
	'Connection opening
	myConn.Open()
	myReader = myCmd.ExecuteReader()
	
	'Read data from SQL Query and assign it to Inventor Parameters as needed. 
	If myReader.HasRows Then
		While myReader.Read()
			iProperties.Value("Project", "Description") = myReader.GetString(1)
			iProperties.Value("Custom", "LongDesc") = myReader.GetString(2)
			iProperties.Value("Custom", "ProductClass") = myReader.GetString(3)
		End While
	Else
		MessageBox.Show("Reader has no rows.", "Blah")
	End If
	
	'closing the reader and connection
	myReader.Close()
	myConn.Close()
		
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 22:22:36 GMT</pubDate>
    <dc:creator>Andrew1307</dc:creator>
    <dc:date>2021-01-28T22:22:36Z</dc:date>
    <item>
      <title>Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7235990#M99430</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to query a SQL database from iLogic with Inventor 2016. I have written some code in VB.net which seems to work. I can create the connection and query a table. But copy and paste of this code doesn't work directly in iLogic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does any one have any recent experience? I found a couple links on the forum mentioning to add reference to&amp;nbsp;&lt;SPAN&gt;Microsoft ActiveX Data Objects 2.8 Library, but I am not sure how this reference can be added in ilogic. Here is the link i am reffering to.&lt;A href="https://forums.autodesk.com/t5/inventor-customization/how-to-connect-to-ms-access-database-from-ilogic/m-p/3612814#M40119" target="_self"&gt;Link to post&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is what I have so far and the result error and warning. Any advice would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;        Dim Connection As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=SQLNCLI11;Data Source=#####;Persist Security Info=True;User ID=###;PWD=###;Initial Catalog=###")
        Dim Command As New OleDb.OleDbCommand
        Dim ds As New DataSet
        Dim da As New OleDb.OleDbDataAdapter
        'Dim rowo As System.Data.DataRow
        'Dim Count As Integer
        Connection.Open()  'open up a connection to the database
        Command.Connection = Connection

		

        Dim partnum As String = "xxx-xxxxxxxx"
        Dim query As String = "Select SpringSAPPN FROM Springs        WHERE  SpringGSPN ='" + partnum + "' "
        da.SelectCommand = New OleDb.OleDbCommand(query, Connection)


        da.Fill(ds, "Table") 'Fill the dataset, ds, with the above SELECT statement
        'Count = ds.Tables("Table").Rows.Count

        MessageBox.Show(ds.Tables(0).Rows(0)(0).ToString)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="warnings.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/379130iBE8297BA815D1ACF/image-size/large?v=v2&amp;amp;px=999" role="button" title="warnings.jpg" alt="warnings.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="errors.jpg" style="width: 587px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/379131i06162D89C26F4848/image-size/large?v=v2&amp;amp;px=999" role="button" title="errors.jpg" alt="errors.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 15:34:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7235990#M99430</guid>
      <dc:creator>jparks_79</dc:creator>
      <dc:date>2017-07-18T15:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7236529#M99431</link>
      <description>&lt;P&gt;Google is a wonderful thing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Inventor-Help/files/GUID-8DF6F761-1634-4D26-B13A-58AF275FD6F8-htm.html" target="_blank"&gt;https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Inventor-Help/files/GUID-8DF6F761-1634-4D26-B13A-58AF275FD6F8-htm.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 19:03:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7236529#M99431</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-07-18T19:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7240903#M99432</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/463821"&gt;@jparks_79&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to add following reference and Imports on top of iLogic rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;AddReference "ADODB.dll"

Imports System.Core
Imports ADODB
Imports System.Linq
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Shapes
Imports System.Windows.Navigation
Imports System.Data&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 06:05:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7240903#M99432</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-07-20T06:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7255847#M99433</link>
      <description>&lt;P&gt;Hi Chandra,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried your example and I get the following errors:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="errors" style="width: 646px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/382523i801E741EB3F62796/image-size/large?v=v2&amp;amp;px=999" role="button" title="ilogic errors.jpg" alt="ilogic errors.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="warning" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/382524i0F59EFD88D9DF688/image-size/large?v=v2&amp;amp;px=999" role="button" title="ilogic warning.jpg" alt="ilogic warning.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code block I have:&lt;/P&gt;
&lt;PRE&gt;AddReference "ADODB.dll"

Imports System.Core
Imports ADODB
Imports System.Linq
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Shapes
Imports System.Windows.Navigation
Imports System.Data

Sub Main()

	Dim Connection As OleDb.OleDbConnection = New OleDb.OleDbConnection("#######")
        Dim Command As New OleDb.OleDbCommand
        Dim ds As New DataSet
        Dim da As New OleDb.OleDbDataAdapter
        'Dim rowo As System.Data.DataRow
        'Dim Count As Integer
        Connection.Open()  'open up a connection to the database
        Command.Connection = Connection

		

        Dim partnum As String = "GSIN09301803500"
        Dim query As String = "Select SpringSAPPN FROM Springs        WHERE  SpringGSPN ='" + partnum + "' "
        da.SelectCommand = New OleDb.OleDbCommand(query, Connection)


        da.Fill(ds, "Table") 'Fill the dataset, ds, with the above SELECT statement
        'Count = ds.Tables("Table").Rows.Count

        MessageBox.Show(ds.Tables(0).Rows(0)(0).ToString)

End Sub&lt;/PRE&gt;
&lt;P&gt;Sorry I am only a novice at this. So I really appreciate the support here.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 15:22:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7255847#M99433</guid>
      <dc:creator>jparks_79</dc:creator>
      <dc:date>2017-07-26T15:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7257402#M99434</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/463821"&gt;@jparks_79&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following changes in iLogic rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;AddReference "System.Data"
AddReference "System.Core"

Sub Main()

	Dim Connection As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection("#######")
        Dim Command As New System.Data.OleDb.OleDbCommand
        Dim ds As New System.Data.DataSet
        Dim da As New System.Data.OleDb.OleDbDataAdapter
        'Dim rowo As System.Data.DataRow
        'Dim Count As Integer
        Connection.Open()  'open up a connection to the database
        Command.Connection = Connection

		

        Dim partnum As String = "GSIN09301803500"
        Dim query As String = "Select SpringSAPPN FROM Springs        WHERE  SpringGSPN ='" + partnum + "' "
        da.SelectCommand = New System.Data.OleDb.OleDbCommand(query, Connection)


        da.Fill(ds, "Table") 'Fill the dataset, ds, with the above SELECT statement
        'Count = ds.Tables("Table").Rows.Count

        MessageBox.Show(ds.Tables(0).Rows(0)(0).ToString)

End Sub&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 05:13:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7257402#M99434</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-07-27T05:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7258163#M99435</link>
      <description>&lt;P&gt;Hi Chandra,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the support. But I gave up yesterday and just made a dll of the code with vb.net. So I just reference that in iLogic. It seems to work well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 12:26:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7258163#M99435</guid>
      <dc:creator>jparks_79</dc:creator>
      <dc:date>2017-07-27T12:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7258205#M99436</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/463821"&gt;@jparks_79&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is working in iLogic, click on "Accept as solution".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 12:42:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7258205#M99436</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-07-27T12:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7258316#M99437</link>
      <description>&lt;P&gt;Hi Chandra,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, that code is not working either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Errors on line 1 and 2: Declaration Expected&lt;/P&gt;
&lt;P&gt;Line 4: statement is not valid in a namespace&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7258316#M99437</guid>
      <dc:creator>jparks_79</dc:creator>
      <dc:date>2017-07-27T13:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7260695#M99438</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/463821"&gt;@jparks_79&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Initially, a data connectivity driver is required for Database connectivity. So, need to download and install "2007 Office System Driver : Data Connectivity Components" from the following link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.microsoft.com/en-us/download/details.aspx?id=23734" target="_blank"&gt;https://www.microsoft.com/en-us/download/details.aspx?id=23734&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast" id="f02a1abe-939a-458c-93dd-f8bfcac43aaa"&gt;&lt;IFRAME width="640" height="620" src="https://screencast.autodesk.com/Embed/Timeline/f02a1abe-939a-458c-93dd-f8bfcac43aaa" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen" style="display: inline;" webkitallowfullscreen="webkitallowfullscreen"&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;Below iLogic rule is used to connect EmployeeInfo database attached with this post. Following iLogic rule requires to update path of database file&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;
&lt;PRE&gt;AddReference "System.Data"
AddReference "System.Core"
AddReference "System.Xml"

Imports System.Data.OleDb
Imports System.Data
Imports System.Xml


Sub Main()

	Dim Table_ As String = "EmployeeInfo"
	Dim query As String = "SELECT * FROM " &amp;amp; Table_
	Dim MDBConnString_ As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Temp\EmployeeInfo.accdb;Persist Security Info=False;"
	Dim ds As New DataSet
	Dim cnn As OleDbConnection = New OleDbConnection(MDBConnString_)
	cnn.Open()
	Dim cmd As New OleDbCommand(query, cnn)
	Dim da As New OleDbDataAdapter(cmd)
	da.Fill(ds, Table_)
	cnn.Close()
	Dim t1 As DataTable = ds.Tables(Table_)
	Dim row As DataRow
	Dim Item(2) As String
	For Each row In t1.Rows
		MessageBox.Show("EID : " &amp;amp; row(0) &amp;amp; " and Employee Name : " &amp;amp; row(1))
		Dim NextListItem As New ListViewItem(Item)
		'ListView1.Items.Add(NextListItem)
	Next
End Sub&lt;/PRE&gt;
Please feel free to contact if there is any doubt.&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;If solves problem, click on "Accept as solution" / give&amp;nbsp;a "Kudo".&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="myscreencast-iframe iframe-container active-myscreencast"&gt;Thanks and regards,&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:07:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7260695#M99438</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-07-28T09:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7260823#M99439</link>
      <description>&lt;P&gt;Chandra,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your code and it works well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a line or two of code that would allow me to write an iproperty value to a database?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 10:10:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7260823#M99439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T10:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7267430#M99440</link>
      <description>&lt;P&gt;Hi @Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try following sample iLogic code to&amp;nbsp;write iProperty to database. This code is tested with database(EmployeeInfo.zip) which is attached in the previous post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;AddReference "System.Data"
AddReference "System.Core"
AddReference "System.Xml"

Imports System.Data.OleDb
Imports System.Data
Imports System.Xml


Sub Main()

    Dim Table_ As String = "EmployeeInfo"
    Dim query As String = "INSERT INTO " &amp;amp; Table_ &amp;amp; "(EID, ENAME, DOB, Designation) VALUES ('6', '"&amp;amp;iProperties.Value("Summary", "Author")&amp;amp;"', #1987-08-03 00:00:00#, 'Technical Consultant')"
    Dim MDBConnString_ As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Chandra\Autodesk Cases\Inventor\July-2017\13195068\EmployeeInfo.accdb;Persist Security Info=False;"
    Dim ds As New DataSet
    Dim cnn As OleDbConnection = New OleDbConnection(MDBConnString_)
    cnn.Open()
    Dim cmd As New OleDbCommand
    cmd.Connection = cnn
    cmd.CommandText = query
    cmd.ExecuteNonQuery()
    cnn.Close()&lt;BR /&gt;
End Sub&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 05:30:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7267430#M99440</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-01T05:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7267691#M99441</link>
      <description>&lt;P&gt;works well thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 08:15:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7267691#M99441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-01T08:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7277794#M99442</link>
      <description>&lt;P&gt;Hi Chandra,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the late reply, but thanks so much for the help! The solution works very well! Do you know if this additional database package would need to be installed on each users workstation in order for the connection to work?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 18:56:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7277794#M99442</guid>
      <dc:creator>jparks_79</dc:creator>
      <dc:date>2017-08-04T18:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7280267#M99443</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/463821"&gt;@jparks_79&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, for every database connection has its own protocols to communicate. So, each database requires driver to connect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 04:22:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/7280267#M99443</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-07T04:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8376174#M99444</link>
      <description>&lt;P&gt;This code works great for reading and writing to an Access database (accdb or mdb).&lt;/P&gt;&lt;P&gt;Now I was wondering if anyone ever took this to the next level and used the default.mdb or a secondary.mdb database used in Catalog Browser?&amp;nbsp; I have a custom Catalog Browser database linked as my secondary database.&amp;nbsp; As long as I am not messing with the fields, tables and links of the existing categories, I think in theory it would work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone ever tried this?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 13:00:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8376174#M99444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-02T13:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8376391#M99445</link>
      <description>&lt;P&gt;&amp;nbsp;Mark,&lt;/P&gt;&lt;P&gt;Are you referring to the electrical catalog browser or something else? I have not tried, but sounds interesting. The key is most likely the correct connection string&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 14:16:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8376391#M99445</guid>
      <dc:creator>jparks_79</dc:creator>
      <dc:date>2018-11-02T14:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468152#M99446</link>
      <description>&lt;P&gt;Is it possible to export data from Inventor to Access?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 11:03:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468152#M99446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-14T11:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468160#M99447</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some of Inventor data&amp;nbsp;can be exported to MicrosoftAccess. Can you please specify Inventor data which needs to export?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 11:08:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468160#M99447</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-12-14T11:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468203#M99448</link>
      <description>&lt;P&gt;I would like to export parameters and custom properties in the drawing environment ...&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 11:27:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468203#M99448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-14T11:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SQL or Microsoft Access from iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468205#M99449</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give me some time. I will let you know the feasibility.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 11:29:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/connect-to-sql-or-microsoft-access-from-ilogic/m-p/8468205#M99449</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-12-14T11:29:40Z</dc:date>
    </item>
  </channel>
</rss>

