Buenas tardes para todos
Como dice el encabezado, necesito realizar una conexión con MSSQL. Alguien ha tenido experiencia con esto? Alguna cadena de conexión?
Saludos
Local xProvider,xSource,xCatalog,xUseris,xPassword,xString
Public oConnect
xSource := "<your server name"
xPROVIDER := "SQLOLEDB"
xCATALOG := "<your database>"
xUSERID := "<your userid that has rights to your database>"
xPASSWORD := <your password to the above userid >
xString := 'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOG+';User Id='+xUSERID+';Password='+xPASSWORD
oConnect := CREATEOBJECT( "ADODB.Connection" ) // oConnect is public connection object
TRY
oConnect:Open( xString )
CATCH oErr
Saying := "Could not open a Global Connection to Database "+xSource
MsgInfo( Saying )
RETURN(.F.)
END TRY
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Julio Cepeda and 78 guests