for a suitable management of GXPublic versions and knowledge bases.
GXPublic
Guid has been changed and this caused the COM Programmatic Id to change too. The new ProgID is "GXPublic.GXPublic.5".
Therefore, if you had the following code:
Cnn.Open("Provider=GXPublic.GXPublic.4")
It should be changed by the following one to access the Yi version knowledge base:
Cnn.Open("Provider=GXPublic.GXPublic.
5")
The new name of the type lib is: "GXPublic 5.0 Type Library"
The supplier is: "GXPublic OLE DB Provider Yi" (e.g.: to use RowSetviewer)
GxpublicFactory keeps the same scheme presented in version 8.0. This means that since there is a GXPublic for each GeneXus version, GxPublicFactory allows opening a knowledge base with the newest GXPublic version that does not imply the conversion of the knowledge base structure.
E.g.:
If you have a Kb 80 and you have GXpublic Yi and 80 installed, you will attempt to open this KB with GXplublic 8.0; otherwise, you would have to convert it.
If you only have Gxpublic Yi version installed, on attempting to open the kb an error will occur: see Convert KB command underneath.
New method: ConnectionString
The ConnectionString() method provides the same parameters as the connect method plus an additional parameter with the connection string. This is useful to be able to use GxpublicFactory from .Net
The ConnectionString() method has three parameters, the first ones are the ones of the Connect method and the additional one is sConnectionString. The latter is a BSTR that has the connection string that Gxpublic must use to open this knowledge base. This is IDL "signature":
HRESULT ConnectionString(in BSTR sKBPath, inout int* pnVersion, out retval BSTR* sConnectionString)
This is particularly useful to be able to use factory from .Net, since the connect method returns an OleDBProvider that cannot interpret the Csharp code.
An example of CSharp code would be the following:
int version = 0;
string path = @"C:ModelsExample";
OleDbConnection connection = new OleDbConnection();
try
{
IConnectionFactory cf = new GXPUBLICFACTORYLib.ConnectionFactoryClass();
string connectionString = cf.ConnectionString(path, ref version);
connection.ConnectionString = connectionString;
connection.Open();
}
catch (COMException ex)
{
throw new ApplicationException(String.Format("Error opening KB {0}
{1}", path, ex.Message]]
}
The Control type and Input Type property was included from ATTPROP and DOMPROP tables
New Kbtype column in KBprop table.
The Kbtype column has been added to the KBprop table. It has the "trial" or "full" version Kb information. The zero value means full, and the "one" value means trial.
New DomUpdTS column in Domain table
The DomUpdTS column has been added to the domain table. It has the domain modification date.
Like the attribute table modification date, this date can be used as filter in where clauses. E.g.: select * from domain where mdlid=1 and DomUpdTS >= {ts 2003-05-15 12:00:00}
Attribute: DomNam
Domain table reading by domain name has been added.
Two new Generator Table fields were included
ActualGenId - The Origin Generator Id (2= VFP C/S, 3= VB, 11= Java, 15 Net, etc)
IsWeb - The value 1 means Win, and the value 2 means Web
New attributes un TRNLVL table
LVLNAM |
Level Name |
LVLTYP |
Elements level type |
LVLDSC |
Description attribute Name |
LVLDSCATTID |
Description attribute Id |
LVLUSR |
User information |
LVLTYP: when using Multilevel transaction and Business component, this value is one of the Business components data type names.
New
GeneXus Object: Language
The object information is published on the OBJECT table with ObjCls = 28
"Or" conditions are triggered properly.
For example the "SELECT * FROM Object WHERE . AND (ObjCls = 0 OR ObjCls = 1)" work fine.
With property support has been included with the following syntax:
With ( XXXX="valor")
This clause goes at the end of the following commands:
the version is indicated with: impact analysis to 2 with (GXVersion 8000)
Generate create db takes into account the 24 (GXVersion) property with this clause. The With clause was already accepted for the Execution property.
Syntax: Distribute . With (OutputPath="c:my distributions", DistributionFlags=1)
The Id's of the equivalent properties in .Net are the following:
1004 "OutputPath" // Output XPW
1005 "OutputDesc" // Output Description
1006 "AppendToOutput" // Append to XPW ?
1018 "DistributionFlags" // Export Type : 1: Do not zipfile
WITH has always priority over what is set in the property.
E.g: in case of the distribute, the OutputPath property is equivalent to the 1004 property for C y and the 19 property for VB/VFP.
Syntax: Consolidate .. With (ConsolidatationType=1)
The Id of the equivalent properties in .Net is the following:
1007 "ConsolidationType" // Import Type: Attributes/Domains | Objects
Syntax: Specify .. With (DetailedNavig=1, SpecificationType=2)
The Id's of the equivalent properties in .Net are the following:
1001 "GenerateAfter"
1002 "SpecificationType"
1003 "DetailedNavig"
1009 "GXVersion"
The consolidate command supports specifying it a mapping file (for adapt from)
Syntax:
consolidate @<nombre.xpz>
MAPFILE "miarchivo.map" with (xxx= .)
On specifying a file relative path you are specifying the knowledge base directory.
A backup of the 1 al 999 model is allowed before performing the consolidation.
Syntax: consolidate @c:expMyExport.xpz with (MakeBackup=1)
The valid values are: 1, Y, Yes, T or True
Syntax: IMPORT WSDL @"<path_xml_file>"
The Xml_File, is created under the Genexus installation path, when calling WSDL Inspector Batch
Syntax: GENERATE HELP FROM <nModelId>
WITH (<Properties>)
<nModelId> It cannot be design model.
<Properties> Same properties as HelpGenerator.ini file (Help compiler path, Help type, etc.). The GenerationDate property is not allowed to set.
Syntax: Import help to <ModelID> @<GXL_File>
with (LangId=<ObjLngId>)
When the language is not specified is refered the model language.
When a general exception occurrs a dump file (crashinfo.zip) is created. This File is created under GXpublic installation directory.
Compiling the Developer menu of the primary generator is supported with the syntax:
COMPILE *
This command must be applied on the knowledge bases previous to YI Beta 2 version to be able to open with Gxpublic Yi version; otherwise, the following error occurs at the connection:
"8: Kb_Need_Conversion"
There is no need to convert the knowledge base:
- If the kb was already converted from
GeneXus (when opening this Kb with Yi Beta2 version)
- If you use Gxpublic Factory and the kb does not open with Gxpublic Yi but with the specific version, such as Gxpublic 80.