Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Pyodbc or other db in Maya?
  RSS 2.0 ATOM  

Pyodbc or other db in Maya?
Rate this thread
 
60495
 
Permlink of this thread  
avatar
  • steebu
  • Posted: 29 September 2011 01:01 PM
  • Total Posts: 45
  • Joined: 09 January 2007 01:40 PM

Hi,

we’re using Maya 2011x64 with Microsoft Sql Server at the backend.  I’ve compiled pyodbc64 and been able to connect to our db using MotionBuilder 2011x64, but I don’t know a thing about how to set it up for Maya.

First of all, let me just say I have no idea what I’m doing in Maya.  :-)

I’ve dropped the pyodbc64.pyd in C:\Program Files\Autodesk\Maya2011\Python\Lib\site-packages\maya

If I bring up the script editor in Maya I can do the following with no error:

import pyodbc64
DSN = ‘MyMocapDB’

now if I do the following:

c = pyodbc64.connect( DSN )

Maya spits back:

# Error: Error: IM002 #

Seems like it’s some kind of connection error, but the exact same code works in MotionBuilder. 

Has anyone gotten pyodbc to work in Maya 2011 in a 64-bit environment?  I’m sure someone has, but I can’t find any info via google ...

Thanks!



Replies: 0
avatar
  • newbee_
  • Posted: 14 October 2011 07:58 AM

Hi,

I think Maya was un-able to locate the file.So i request you to check your os.path. Here is an example for connecting MySQLdb with Maya.

http://chrischia.info/blog/?p=8

Thank you



Replies: 0