Problem connecting to MSSQL 2008R2 via Windows Auth.

Problem connecting to MSSQL 2008R2 via Windows Auth.

Postby cdmmaui » Mon Oct 28, 2013 4:55 pm

Hello,

I am having a problem connecting to Microsoft Windows 2008 R2 server via Windows Authentication using the following string.

xPROVIDER := "SQLOLEDB"
xDATABASE := "MobileFrame" , ;
xSOURCE := "192.168.1.11"
xUSERID := "DOMAIN\UserName"
xPASSWORD := "Password"

xSQL := 'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xDATABASE+';User Id='+xUSERID+';Password='+xPASSWORD

cSql := "SELECT * FROM capsonic_receive WHERE deleted_by<0"
TRY
oSql:Open( cSql, xSQL )
CATCH oError
MsgInfo( xSQL + cEol + oError:Description, "Failed to Connect to the Database" )
RETURN .F.
END

oError:Description returns DISP_E_UNKNOWNNAME

Can someone assist
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Problem connecting to MSSQL 2008R2 via Windows Auth.

Postby Rick Lipkin » Mon Oct 28, 2013 8:07 pm

Darrell

I would re-think your Windows authentication idea and use a single ( user ) database connection string and control your users and roles with a table you maintain at the application level.

Every time you get or want to drop a user .. you will have to go into the Sql Server utility and make your changes at the database level.

Just my 2 cents :|

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Problem connecting to MSSQL 2008R2 via Windows Auth.

Postby cdmmaui » Tue Oct 29, 2013 4:46 am

Thanks Rick.

My client is requiring this.

They actually provided wrong information and now everything is working.

Thanks for your response.
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests