Hello Everyone,
We are looking to integrate MS SQL to our FWH ADS/DBF application. Does anyone have any examples on connecting/ending connection to MS SQL server and commands (SELECT, INSERT, UPDATE, DELETE)? It would be must appreciated.
Sincerely,
// Connecting to MS SQL Database
cConnectSring:="Provider=SQLOLEDB;server=YourIP;database=YourDbName;uid=YourUserName;pwd=YourPassword"
TRY
oConnection:=CreateObject("ADODB.Connection")
CATCH
MsgInfo("It seems that your PC does not have MDAC installed OR MDAC is corrupted.")
Return .F.
END
oConnection:ConnectionString:=cConnectSring
TRY
oConnection:Open()
CATCH oError
MsgInfo("Failed to Connect to the Database")
RETURN .F.
END
// Disconnecting
if oConnection:State() = adStateOpen
oConnection:Close()
Endif
oConnection:=NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 97 guests