Hello!
Does FW access MS-SQl Server as well as access MySQL?
Tks
Rodrigo Melo
Brazil
xPROVIDER := "SQLOLEDB"
xSOURCE := "MYCOMUTER-PC\SQLEXPRESS"
xCatalog := "MyDatabaseName"
xUserId := "sqluserID"
xPASSWORD := "mypassword"
xString := 'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOG+';User Id='+xUSERID+';Password='+xPASSWORD
// global connection string
xConnect := CREATEOBJECT( "ADODB.Connection" )
TRY
xConnect:Open( xString )
CATCH oErr
Saying := "Could not open a Global Connection to Database "+xSource
MsgInfo( Saying )
RETURN(.F.)
END TRY
oCn := FW_OpenAdoConnection( { "MSSQL", cServer, cCatalog, cUser, cPassword }, .t. )
if oCn == nil
? "not connected"
return nil
// do your work
oCn:Close()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 48 guests