BookmarkSubscribe
Choose Language Hide Translation Bar
DSA
DSA
Community Trekker

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

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
ih
ih
Community Trekker

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..."
	);
2 REPLIES 2
Highlighted
ih
ih
Community Trekker

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
Community Trekker

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

Thank a lot for the very quick and accurate help!

 

It worked perfectly :)

0 Kudos