Connecting to remote mysql database

DuhastDuhast Member Posts: 42
I want to do this :

"Sales Line"."No." trigger onValidate

I want to search that value at remote mysql database :
-Finding that value mean an error will occur (It will be not possible to insert a value that exists at remote database).
-Don't find, nothing happens.

Can I do it?

If it's not possible, how can I do something similar?

I thougth about a simple jsp page. I can send "No." as a parameter and execute a query using jsp. I can open an explorer page, but I cannot stop user to introducing that value. :(

Thanks to all

Comments

  • kinekine Member Posts: 12,562
    If you are using MS SQL option for NAV, what about Linked server through ODBC to the MySQL. Than may be you can create some view and add it into NAV as LinkedObject. But I didn't test it and I do not know if it is possible (just brainstorming).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Revolution1210Revolution1210 Member Posts: 161
    Or maybe you could do an AJAX style XML HTTP request using automation 'Microsoft XML, v6.0'.XMLHTTP...
    CREATE(xmlHTTP);
    
    Request := 'http://domain/search.asp?itemno=10000';
    
    xmlHTTP.open('GET',Request,TRUE);
    xmlHTTP.send('');
    
    

    Grab the response from your page:
    IF xmlHTTP.readyState = 4 THEN 
      Response := xmlHTTP.responseText
    
    // do something with response...
    

    Parse response as required and use to perform your logic
    Ian

    www.NextEqualZero.com
    A technical eye on Dynamics NAV
  • themavethemave Member Posts: 1,058
    What about creating a new table in Navision, and updating that with your remote database on a regular basis. Is you Mysql constantly changing, or is it relatively static, there are lot of examples of updating Navision tables by checking for files in a directory. Have your mysql create the file, when there is a change, and have Navision check that directory with a timer to load updates to your new navision table.
Sign In or Register to comment.