WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: pauls681 on December 17, 2020, 12:54:32 PM

Title: Sql DSN Parameters
Post by: pauls681 on December 17, 2020, 12:54:32 PM
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)
Title: Re: Sql DSN Parameters
Post by: pauls681 on December 17, 2020, 01:44:28 PM
I figured it out. I needed to add Trusted_Connection=Yes
Title: Re: Sql DSN Parameters
Post by: td on December 17, 2020, 02:11:05 PM
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...
Title: Re: Sql DSN Parameters
Post by: kdmoyers on December 21, 2020, 04:21:11 AM
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