View Full Version : pflow and sql database connection

10 October 2010, 11:04 AM

i want to assign data of a sql db to particles. but i cant manage to get a connection from a script inside the scriptoperator. the connection is working, if i am running the script as a normal max script.
Even if i export all db stuff to another script and try to run it with include "" it isn't working.

Any suggestions?

10 October 2010, 02:46 PM
what kind of data are you processing? Is it something PFlow can handle?
nice to see pflow users in the harz mountains :) I'm from hannover!


10 October 2010, 03:31 PM
i am working on a project to show the results of air turbulence around a car body in the furnace after lacquering. In the database is stored a velocity vector for every volume (~2 million) around the car body for the hole process.

my script ist like:
init db connection
get Position of particle and get the proper volume
query db for velocity vector in that volume at the current time
assign result to pCont.particleSpeed

the problem is the initialization of the database connection inside a script operator.
i used my usual init of a sql connection like i did in a couple of other projects.
But this is the first time i want to use it with particle flow.

database = createOLEobject "ADODB.Connection" "Provider = SQLOLEDB; server=...; uid=...; pwd=...; database=..."
Volocity = createOLEObject "ADODB.Recordset"
Volumes = createOLEObject "ADODB.Recordset"

If i use the exact terms in a script outside pflow the connection and queries are working. but inside pflow it gives an error on : database = createOLEobject "ADODB.Connection"

10 October 2010, 07:06 PM
you might wanna contact Oleg directly. He wrote PFlow and all it's extensions.

CGTalk Moderation
10 October 2010, 07:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.