FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Information Visualization
(Moderators: forkinsocket, REAS)
   accessing MsSql database with processing
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: accessing MsSql database with processing  (Read 1032 times)
Jean Jacques
Guest
Email
accessing MsSql database with processing
« on: Dec 18th, 2003, 8:46pm »

Hello,
I'm trying to access MsSql data from proce55ing.
Now i'm working with loadstream() but this way dosens't seem to work.
 
Is there someone who has already done on-line text processing with proce55ing ?
 
Hope to hear from you !
 
All the best  
 
Jean Jacques
 
toxi

WWW
Re: accessing MsSql database with processing
« Reply #1 on: Dec 22nd, 2003, 1:30pm »

i've *just* started going down the PHP/mySQL -> XML route in order to get data into processing and so far it works great as long as the php files are on the same server as the applet will be later on. when running from within the PDE you can load data from anywhere, without this security restriction.
 
for a simple xml example, have a look here
 

http://toxi.co.uk/
Mad Merv
Guest
Email
Re: accessing MsSql database with processing
« Reply #2 on: Jan 3rd, 2004, 2:53pm »

Actually, I am rather disgusted with some of the routines present in java, due to the difficulty in manipulating utilizing a pointer/array method present in C/C++.
 
However, I have noticed that Java.lang.String() and the indexOf() function are extremely important in doing basic textual manipulations.
 
Perl in Java would be cool.   A perl processor might be interesting..
 
Euskadi


Re: accessing MsSql database with processing
« Reply #3 on: Mar 3rd, 2004, 4:33am »

I'm getting a little bit of data from MySQL into P5 by using PHP to query the database and build me a webpage on the fly.  I have PHP build the page setting applet parameters that P5 pulls in with param().
 
By the same method, you should be able to create a PHP servlet that queries your database and responds back with the data you want... suppose your Applet wants the value for item "X"... do something like:
Code:

//probably some syntax errors here
String s = getstrings("http:\\www.myserver.net\question.php?item='x'");
 
int result = (int)s;

 
 
tonylemesmer

WWW
Re: accessing MsSql database with processing
« Reply #4 on: Mar 3rd, 2004, 11:47pm »

I have also started to do this using splitStrings() and splitInts(). see here http://www.brodler.com/mongol_rally/
 
Using a php file to create a webpage (http://www.brodler.com/mongol_rally/coords.php) in a known format (int int int, String \n) it is possible to get the data into p5. Seems like you could include an SQL statement in the requested URL although this could be dangerous!
 
(Obivously these coordinates are made up
 
I hacked this one together from the gui examples.
 
jt
« Last Edit: Mar 3rd, 2004, 11:47pm by tonylemesmer »  
Pages: 1 

« Previous topic | Next topic »