cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
DSA
DSA
Level III

SQL pulls to SQLserver without setting a machine data source?

Hi JMP community,

I am playing with a ODBC connection to a SQLserver, and everything works nice when i connect via open table or query builder. I have then created my own query in JSL to be used with the open database() command, and that works well as well.

 

 

Right now my connection string looks like this SQLconnect="DSN=MyDatabase;Description=MyDatabase;Trusted_Connection=Yes";

 

MyDatabase is referring to the Data source I have created in the user interface using the standard microsoft SQL server driver and a server address, the rest are default settings.

Can I explicitly put all of this in my connection string, and how do I do that?

 

We hope to share this tool, and it would be annoying if I had to force all users to define their machine data source exactly as I did before they can use the tool.

 

Thanks in advance,

Daniel

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: SQL pulls to SQLserver without setting a machine data source?

Yes:

Open Database(
		"DRIVER=SQL Server;SERVER=mysqlserver\dbname;" ||
			"Trusted_Connection=Yes;APP=Microsoft® Windows® Operating System;",
		"SELECT * from db..."
	);

View solution in original post

2 REPLIES 2
ih
Super User (Alumni) ih
Super User (Alumni)

Re: SQL pulls to SQLserver without setting a machine data source?

Yes:

Open Database(
		"DRIVER=SQL Server;SERVER=mysqlserver\dbname;" ||
			"Trusted_Connection=Yes;APP=Microsoft® Windows® Operating System;",
		"SELECT * from db..."
	);
DSA
DSA
Level III

Re: SQL pulls to SQLserver without setting a machine data source?

Thank a lot for the very quick and accurate help!

 

It worked perfectly :)