Sql DSN Parameters

Started by pauls681, December 17, 2020, 12:54:32 PM

Previous topic - Next topic

pauls681

I am trying to set up a sql dsn which is working. However, I need to select "With Windows NT auth using the network login ID"
When the code below creates the dsn it is choosing the SQL server auth selection. How do I get it to choosed the Windows method?
This is my code:
DSNName = "Programs1"
database = "Programs"
servername = "Server"
DSNDesc = "" 
request=4;ODBC_ADD_DSN
driver="SQL Server";case sensitive
attrs="DSN=%DSNName%|DATABASE=%database%|SERVER=%servername%|DESCRIPTION=%DSNDesc%";pipe delimited
displayflag=@False
ret=qConfigData(request, driver, attrs, displayflag)

pauls681

I figured it out. I needed to add Trusted_Connection=Yes

td

About to suggest that you configure a test DSN using the OS's built-in ODBC Administrator tool and then do as the extender help file suggests and look in the indicated registry locations for the applicable DSN parameter.  But never mind...
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

Nice! thanks for sharing, this might be handy for me in future.

Quote from: pauls681 on December 17, 2020, 01:44:28 PM
I figured it out. I needed to add Trusted_Connection=Yes
The mind is everything; What you think, you become.