cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

Missing Data Source in .jmpquery file

I have a working SQL query using the New SQL Query () function. When I first open this with JMP is works perfectly, however when I try to "Update Database" or "Modify Query", neither work. I've noticed it is because the Connection () function appears to disappear after first use which is unusual. This problem has only just occurred after 3 or 4 days, as it was fine before this and I could update the database as much as I wanted. A colleague has had the same issue of it working then suddenly it's only single-use. My first though is that the connection has some sort of lifetime which it seems to have surpassed but if so, that's quite annoying as it means I have to manually copy-paste the connection function each time I want to update the datatable. Below is the connection example (details changed for privacy): 

 

Names Default To Here( 1 );
New SQL Query(
    Connection(
        "ODBC:BI=0;BoolsAsChar=1;ByteaAsLongVarBinary=1;CommLog=0;DATABASE=database;DSN=PostgreSQL30;Debug=0;FakeOidIndex=0;Fetch=100;LFConversion=1;LowerCaseIdentifier=0;MaxLongVarcharSize=8190;MaxVarcharSize=255;PORT=1111;PWD=%_PWD_%;Parse=0;Protocol=7.4;ReadOnly=0;RowVersioning=0;SERVER=11.111.11.111;SSLmode=disable;ShowOidColumn=0;ShowSystemTables=0;TextAsLongVarchar=1;TrueIsMinus1=0;UID=username;UnknownSizes=0;UnknownsAsLongVarchar=0;UpdatableCursors=1;UseDeclareFetch=0;UseServerSidePrepare=1;XaOpt=1;"
    ),
    QueryName( "name of query" ),
    CustomSQL(
       query_here
    )
);
3 REPLIES 3
Phil_Kay
Staff

Re: Missing Data Source in .jmpquery file

I am no expert on database connection. But from my limited experience this feels like the issue is on the database side, rather than the JMP side. Everything within "Connection(...)" is about how your machine connects with the database via ODBC connection. It is not about what JMP is doing. I can't imagine that part of the JMP script is somehow expiring. It is more likely that the database details or credentials have changed from the initial query. I would suggest that you talk to the manager of the database and ask them if they can help you to understand what might have changed.

Re: Missing Data Source in .jmpquery file

Hi Phil. Thanks for your comment. What you're saying sounds right, however, coping in the previous "Connection(...)" part back into the query works just fine and the connection still exists on my machine so I don't think the problem is with the database, as the details and credentials for access are identical.

Re: Missing Data Source in .jmpquery file

Make sure that "Hide ODBC Connection Strings" isn't selected in the JMP preferences.