-
- debseach3 definition
- New index
- Custom index
- Search server
- Rewrite rules IIS
- Result in html
- Task refresh index
Introduction
The debdata3 library will give you all you need to connect to a DataEase application, read, edit, update and delete it's data in a pythonic way. This means to hide away the gritty details of debprism and let you use typical python patterns for error handling and iterating trough data. In a later version you will also be able to change tdf's and create and delete tables, but you will not be able to manipulate frm's and the like. To do that you need to use DataEase. This module only works on the data part of the application.
To install use pip and one extra setting to point on our own pypi server at https://download.2imply.com/python3. If not already install you will need debprism9 for prism9 (or other version of debprism when that is available) to use debdata3. See documentation for debprism to see what version of python is supported.
pip install debprism9 --extra-index-url https://download.2imply.com/python3
pip install debdata3 --extra-index-url https://download.2imply.com/python3Then you will need to connect to prism correct prism version and point to a license file before use. The sample is just point to your deserver9 license file as default is the to use C:\ProgramData\DataEase\thesubfoderofstartupcommand that can be python3.XX, pythoncore-3.XX-32 or something else if you installed somewhere else on your system. The license have to be compatible with the prism version you are using. The you simply create the PrismConnector and add that as last parameter to debdata3 when connection to repository by using getrepo function. From here everything you do are created from the returned variable from getrepo. In this example we have called it repo.
from debprism9 import PrismConnector
from debdata3 import getrepo
repopath = "C:\\Data\\YourAppPath"
reponame = "YourAppName"
repoun = ""
repopw = ""
try:
gprism = PrismConnector()
if gprism.initprism():
#set the license path to same as deserver9
gprism.getprism().runfunction("DEOS", "@setlicensepath", "C:\\ProgramData\\DataEase\\deserver9")
print("all ok prism started")
else:
print("you could not start prism")
repo = getrepo(repopath, reponame, repoun, repopw, gprism)
print("Repository is open")
tlist = repo.tablelist()
for t in tlist:
print(t)
except Exception as e:
print(e)
code = str(e).split(':')[0]
if code == '105':
print ("License path used: %s" % gprism.getprism().runfunction("DEOS", "@getlicensepath"))Example to connect to prism, set license path to the same as deserver, open a repository and list all tables