Notifications
Clear all

[Closed] max and SQL ?

Hello people,

I was wondering… this is a question of pure speculation :

while working on a small team project, I use a SQL database and a PHP page to keep track of the progression of the work. It’s VERY primitive, but it’s absolutly customized to my needs and I’m happy with it.

Then the question is : does anyone know if it’s theorically possible to access a SQL DB with MaxScript (probably via a PHP file). It could be usefull to, for exemple, enter and check a check-list directly in the Max interface. Or other uses I have still not thought of.

And if you believe it’s possible, do you have any advice about the direction I should go ? At this time I don’t see anyway to do that, but there may be some tools or workaround I’m not aware of…

thanks for any input

Jerome

12 Replies

At this time, I don’t think it’s possible to initiate a connection to a db directly through maxscript. You may be able to use DOSCommand to execute a PHP script which dumps its results into a text file, then harvest the results from maxscript by opening and parsing the text file. I’ve written a couple of tools that perform a similar function using the output from Python scripts; it’s not the most elegant solution but it certainly works.

btw if you don’t like how DOSCommand shows the command prompt window while executing, Mike Biddlecombe has written a small Maxscript extension which provides the function HiddenDOSCommand. It works just like DOSCommand except that it doesn’t show the cmd box.

<allonym>

I was wondering the same question not to long ago. I tried to accomplish a similar task: take the current work in progress file, copy it on an increment, send it VIA SMTP server (to a piped email address) then have a cron job download the attachment, store the information in a SQL database.

I could not figure out to retrieve the information back into max just from max (without using for example IE)

Hope this was helpful, I was just blabbing, so maybe you can get something out of it.

Jon

Max 8 will have sql capabilities

Are you serious! Awesom. Is there any documentation or tutorials about this?

1 Reply
(@erilaz)
Joined: 11 months ago

Posts: 0

Not yet, but maxscript is definately fleshed out with SQL and there’s a debugger finally!
Here’s the wrap from the tech sheet:

MAXScript Scripting Language
• Automate your production pipeline with the ability to query a
database using MAXScript SQL Connect and Queries.
• Build MAXScripts faster with our MAXScript debugger. This
debugger follows industry standards and allows you to set break
points and isolate any issues in your scripts.
• Expression controllers now have full MXS support.
• Rebuilt scripted controller supports name independence.

Interesting. Will it be anything like the SQL aupport in Toxik?

I would assume that’s the way they’re going, so they can link the products together more smoothly. Max 8 is also getting a similar asset management system like Toxik as a I recall.

Man, I can’t believe they are already coming out with 8… I just got 7 like 2 months ago. lol.

As a student… It stinks because of the money

They are really busting their butts to be the #1 3d software! GO DISCREET/AUTOCAD~ keep it up!

Thanks a lot guys for the informations.

The command prompt workaround may work and seems a good idea. But if Max 8 is coming with new maxScript about SQL, I think I’ll just wait. I have no emergency.

This is definitly a good news.

Jerome

probably, there may be an ActiveX component for work with DBs…?

Page 1 / 2