MS SQL 2005 - Windows authentication

Windows specific forum
User avatar
Haruks
User
User
Posts: 30
Joined: Wed Sep 23, 2009 1:41 am
Location: Brasil (Brazil)

MS SQL 2005 - Windows authentication

Post by Haruks »

Hello all,

Have any way to connect to MSSQL server 2005/2008 using Trusted_Connection or Integrated
Security (Windows authentication)?

Best regards.
=D
noorderling
User
User
Posts: 16
Joined: Fri Jul 16, 2010 3:54 pm

Re: MS SQL 2005 - Windows authentication

Post by noorderling »

I did through odbc, that worked ok for me.
User avatar
Haruks
User
User
Posts: 30
Joined: Wed Sep 23, 2009 1:41 am
Location: Brasil (Brazil)

Re: MS SQL 2005 - Windows authentication

Post by Haruks »

Hello noorderling, Thanks for your reply,

did you make a connection to MSSQL using ODBC with Windows authentication?
can you post your code?

Thank you.
=D
noorderling
User
User
Posts: 16
Joined: Fri Jul 16, 2010 3:54 pm

Re: MS SQL 2005 - Windows authentication

Post by noorderling »

It's a 2-step thing:

First the hard part: make a user-odbc* with the help of odbc manager, and save it.
This is where you select if network login or user/pass is used to access the database.
You can validate the login here before saving.
This part I did not by coding, but manually in systemmanager.

In PB than initialize the odbc driver by useodbcdatabase().
You than call opendatabase(#db, "odbc-name just created", user, pass) with nullstring or empty string for user/pass.

* or machine if it is to be for every user on that machine.
Post Reply