All the solutions ive found to find your current Creatio version/distribution require you to use a specific MSSQL SQL query that doesnt work with PostgreSQL and doesnt seem to have any easy syntax conversion, does anyone have any ideas?

Like 2

Like

3 comments
Best reply

Oliver Crowe,

Use 'Product Version'

SELECT "Name", "TextValue"  FROM public."SysSettings" 
left join public."SysSettingsValue"  on public."SysSettings"."Id" = Public."SysSettingsValue"."SysSettingsId" 
where  "Name" = 'Product version' 

 

SELECT "Name", "TextValue"  FROM public."SysSettings" 
left join public."SysSettingsValue"  on public."SysSettings"."Id" = Public."SysSettingsValue"."SysSettingsId" 
where  "Name" = 'Configuration version' 

 

keith schmitt,

How do you get it to involve the product distribution? eg Sales enterprise/Studio

Oliver Crowe,

Use 'Product Version'

SELECT "Name", "TextValue"  FROM public."SysSettings" 
left join public."SysSettingsValue"  on public."SysSettings"."Id" = Public."SysSettingsValue"."SysSettingsId" 
where  "Name" = 'Product version' 

 

Show all comments

Hi,

I'm trying to run from a script task a postgres stored procedure, but the postgres database return an error "call" is missing,

What Am I doing wrong ?

bool retCode = false;
var userId = Get<Guid>("UtenteId");
var year = Get<int>("Anno");
 
var userConnection = Get<UserConnection>("UserConnection");
StoredProcedure storedProcedure = new StoredProcedure(userConnection, "SifLoadSurvey");
storedProcedure.WithParameter("Year", year);
storedProcedure.WithParameter("UserId", userId);
storedProcedure.InitializeParameters();
storedProcedure.PackageName = userConnection.DBEngine.SystemPackageName;
 
using (var dbExecutor = userConnection.EnsureDBConnection()) {
	try {
        dbExecutor.CommandTimeout = 0;
        dbExecutor.StartTransaction();
        storedProcedure.Execute(dbExecutor);
        dbExecutor.CommitTransaction();
        retCode = true;
    } catch(Exception ex) {
        dbExecutor.RollbackTransaction();
        retCode =  false;
    }
}
return retCode;

 

Like 0

Like

5 comments

Hi, 

I solved it by converting the postgres procedure in a function

Hi, Stefano!

Did you call postgres function in C# code as StoredProcedure?

Stefano Bassoli, did you call your postgres function as a StoredProcedure ?

Stefano Bassoli, 

did you call the postgres function as StoredProcedure ?

Hi sorry for my late answer,

I call the postgres function as a StoredProcedure

Show all comments