Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to connect Inventor to PHC SQL Crystal Reports Database???

3 REPLIES 3
Reply
Message 1 of 4
Fredalone
662 Views, 3 Replies

How to connect Inventor to PHC SQL Crystal Reports Database???

Hi there,

Can someone tell me how to connect the Inventor db to PHC db ?

Its an SQL Crystal db on manufactor... but I dont know what is of the inventor...

 

Gratefully,
Fred

3 REPLIES 3
Message 2 of 4

Hi

 

Can you be more precise about what you are looking for?

 

What is it that you call the Inventor db exactly?

 

Thank you.

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 4

All the information codes that I put is this:

 

 

Spoiler

Function ligasql()

Dim nomeBancoDados, nomeUsuario, senha As String
nomeBancoDados = "ITAVARES"
nomeUsuario = "fred"
senha = "1234"

'Declare variables'
Dim objMyConn As ADODB.Connection
Dim objMyCmd As ADODB.Command
Dim objMyRecordset As ADODB.Recordset

Set objMyConn = New ADODB.Connection
Set objMyCmd = New ADODB.Command
Set objMyRecordset = New ADODB.Recordset

'Open Connection'
objMyConn.ConnectionString = "Provider=SQLOLEDB;Data Source=ITAVARES;User ID=fred;Password=1234;"
objMyConn.Open

'Set and Excecute SQL Command'
Set objMyCmd.ActiveConnection = objMyConn
objMyCmd.CommandText = "select NUMOF from tabOf"
objMyCmd.CommandType = adCmdText
objMyCmd.Execute

'Open Recordset'
Set objMyRecordset.ActiveConnection = objMyConn
objMyRecordset.Open objMyCmd

MsgBox (objMyRecordset.Index(1))

'Dim db As database
'Dim strConnection As String

'Set ws = DBEngine.Workspaces(0)
'Let strConnection = "ODBC;DSN=ITAVARES;UID=fred;PWD=1234"
'Set db = ws.OpenDatabase("", False, False, strConnection)

'"Data Source=ITAVARES;Provider= MSDASQL.1;Initial Catalog=Manit;Persist Security Info=True;User ID=fred;Password=1234; Option =3 "
' oConn.Open

'Dim rs As Recordset

'Set rs = db.openrecordset(NUMOF)

'Do While Not rs.EOF
' intID = rs!IDField
' MsgBox (intID)
' rs.MoveNext
'Loop

'rs.Close
'Set rs = Nothing

'rs.ActiveConnection = oConn

'rs.Open "SELECT * from tabOf"


End Function

 

 

 

Im trying to connect to another table, but I cant make the MSGBOX appear with the "name" or the information of the table 😞

 

I dont understand to much of SQL xD

 

Message 4 of 4

Well, this forum focuses on Inventor API specific questions. What you are asking there seems to be more related to SQL/ADO. You may have more luck seeking advice on an ADO dedicated forum or directly browsing the web for some tutotrials.

 

Sorry for not being more helpful.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report