Connecting to a database with .NET inside Max

Connecting to a database with .NET inside Max

Anonymous
Not applicable
326 Views
2 Replies
Message 1 of 3

Connecting to a database with .NET inside Max

Anonymous
Not applicable
Hi, I'm trying to import some data into Max 9 (64-bits) from our Oracle database but I'm experiencing some problems.

There are some problem with Oracle ODBC drivers with Windows XP 64, so I'm trying to do the connection using .NET objects as it seems that is possible to connect to a database trough .NET without using ODBC.

The code for the connection should be something like this:

dotnet.loadassembly "System.Data.OracleClient"
connectionString = "Data Source=192.168.0.68;Integrated Security=true;"
connection = dotNetObject "System.Data.OracleClient.OracleConnection" connectionString
connection.Open()


But I get a (Exception from HRESULT: 0x8007000B) error.

Anyone know what I'm doing wrong or has experience on the subject?

Thanks
0 Likes
327 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
That looks like an error from the .NET assembly itself rather than MAXScript; you should probably check the OracleClient documentation.

I've only done MySQL connections via ODBC on a 32b system, so I can't really say anything more.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for the reply Stokes 🙂

I've been able to do the connection in 3DSMax 8 using the MaxScript inbuilt SafeArrayWrapper, the problem is that now most of our machines are 64bit and cant use this method anymore 😠

I've checked MSDN documentation on OracleClient, but is quite hard for me to follow because I have little experience with .NET and still less with Oracle Databases ...

Anyone has experience connecting to a DB using .NET?
0 Likes