|
|
|
|
|
HDeleteLink (Function) In french: HSupprimeLiaison
Available only with this kind of connection
Deletes an integrity rule between two data files on the server. The integrity rule to delete is defined by a Link description variable. The deletion will be effective for the application that performed it once the connection has been closed and re-opened. MaConnexion is Connection
MaLiaison is Link Description
MaLiaison.FichierSource = ".\ville.fic"
MaLiaison.FichierRelié = ".\client.fic"
MaLiaison.CléSource = "NOMVILLE"
MaLiaison.CléReliée = "VILLECLI"
HDeleteLink(MaConnexion, MaLiaison)
CnxHFSQL is Connection
CnxHFSQL.Provider = hAccessHFClientServer
CnxHFSQL.Utilisateur = "admin"
CnxHFSQL.MotDePasse = ""
CnxHFSQL.Serveur = "HFSQLServeur:4900"
CnxHFSQL.BaseDeDonnées = "CRM"
HOpenConnection(CnxHFSQL)
sListeLiaisons is string = HListLink("*", CnxHFSQL)
sInfoUneLiaison is string
UneLiaison is Link Description
FOR EACH STRING sInfoUneLiaison OF sListeLiaisons SEPARATED BY CR
IF sInfoUneLiaison <> "" THEN
UneLiaison.Nom = ExtractString(sInfoUneLiaison, 1, TAB)
UneLiaison.FichierSource = Replace(ExtractString(sInfoUneLiaison, 2, TAB), CnxHFSQL.BaseDeDonnées, ".", IgnoreCase)
UneLiaison.CléSource = ExtractString(sInfoUneLiaison, 3, TAB)
UneLiaison.FichierRelié = Replace(ExtractString(sInfoUneLiaison, 5, TAB), CnxHFSQL.BaseDeDonnées, ".", IgnoreCase)
UneLiaison.CléReliée = ExtractString(sInfoUneLiaison, 6, TAB)
Trace("Suppression >> " + UneLiaison.Nom + " >> " + HDeleteLink(CnxHFSQL, UneLiaison))
END
END
Syntax
<Result> = HDeleteLink(<Source connection> [, <Linked connection>] , <Link description>)
<Result>: Boolean - True if the operation was performed,
- False if a problem occurs. HErrorInfo is used to identify the error.
<Source connection>: Character string or Connection variable Connection to which belongs the source file of the link. This connection corresponds to: <Linked connection>: Optional character string or Connection variable Connection to which belongs the linked file of the link. This connection corresponds to: If this parameter is not specified, both data files will belong to the same connection (<Source connection>). <Link description>: Link Description variable Name of the Link description variable containing the characteristics of the link to delete. The link to delete is defined by the source data file, the source item and the linked item. Remarks Link description - The names of the data files in the link description (SourceFile and LinkedFile properties) must correspond to the physical name of the data files, relative to the relevant database. The database of each data file is returned by the <Source connection> and <Linked connection> parameters
- To delete a link, there is no need to describe all the characteristics of the link. Only the following properties are required:
| | LinkedKey | Item of the linked data file used in the link. | SourceKey | Item of the source data file used in the link. | LinkedFile | Name of the linked data file used in the link. | SourceFile | Name of the source data file used in the link. | nom | Link name. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|