FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem connecting to MSSQL 2008R2 via Windows Auth.
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Problem connecting to MSSQL 2008R2 via Windows Auth.
Posted: Mon Oct 28, 2013 04: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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Problem connecting to MSSQL 2008R2 via Windows Auth.
Posted: Mon Oct 28, 2013 08: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

Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: Problem connecting to MSSQL 2008R2 via Windows Auth.
Posted: Tue Oct 29, 2013 04: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

Continue the discussion