Quantcast
Channel: Data Abstract - RemObjects Talk
Viewing all 1235 articles
Browse latest View live

DA client class lib - auto login to Relativity?

$
0
0

@aolson wrote:

I’m using a .NET class lib on the client side of my DA app and need to add code to log in everytime I instantiate a datamodule from it. I’m curious if there is a way to add the login code to the class lib to avoid having to add this code when creating a datamodule?

Posts: 2

Participants: 2

Read full topic


Something I don't understand about the business rules interfaces

$
0
0

@tobygroves wrote:

Hi,

I’m a bit confused about something.

In my data modules, where my TDAMemDataTables are declared, I’m obtaining an interface reference to the associated client rules objects from each of my tables. Via the QueryInterface override of TDADataTable, this returns an interface reference to the contained object fBusinessRules.

What I don’t understand is why, when I either set this interface reference back to NIL or allow it to go out of scope, the reference counting system isn’t destroying the underlying client rules object.

Surely it should but it’s obviously not or I’d be getting access violations?

Posts: 8

Participants: 2

Read full topic

Unigui Application -> access violation when deployed as ISAPI

$
0
0

@Bernaert_Dominique wrote:

Hello,
I’m working on a Unigui application, I use Data Abstract in combination with Relativity server.
Everything is running fine when testing the application and compiling it as an application.
When I compile the application as an isapi dll, I get an access violation when starting the web application.

Does anybody know how this comes?
I ran the application as an application on the server and it works perfectly.

This is running on a windows server with IIS.
I have several other ISAPI dll’s running fine with ADO and Firebird.

This is quite urgent, I cannot deploy an update that I promised a customer.

Thx,
Dominique

Posts: 2

Participants: 1

Read full topic

DisplayLabel on Field is ignored until table is not open

$
0
0

@ales.hrodek wrote:

Hi,

There is problem with using DisplayLabel for fields in TDAMemDataTable. DiplayLabel is not used in grid until table is opened first time. If you close table later then DisplayLabel stays.

Replication is easy:

  • add TDBGrid, TDAMemDataTable and TDADataSource to form and link them.
  • Add Field with different name and DisplayLabel
  • Activate data table, Create New field in grid, Deactivate data table. (correct label in design-time)
  • On run-time label is field name until table is opened.

See attached example.

Posts: 3

Participants: 2

Read full topic

Why would an IROStream be empty?

$
0
0

@tobygroves wrote:

I’ve got a strange problem with a stream object.

I have a table with a binary field. I’m using strongly typed classes so I have a field in my interface which is of type IROStream.

When I open a record in this table, which has data in the binary field, there’s nothing in the stream at all. I can inspect the Stream property of the IROStream and it is indeed of type TMemoryStream but the stream itself is totally empty, showing NIL for the memory property and zero for size. All other fields are loading fine.

What could be causing this?

Posts: 3

Participants: 2

Read full topic

DOA Driver unable to work with datLargeAutoInc, datLargeUInt and datDecimal fields

$
0
0

@Christen_Blom_Dahl wrote:

Current implementation of function uDADOADriver.DataTypeDaToOra(AType: TDADataType) returns value otNumber when the aType param has the values datLargeAutoInc, datLargeUInt or datDecimal.
This value is not handled by TOracleDataSet.DeclareVariable which is called by SetDataSetParams.SetDataSetParams throwing an exception with message ‘Unsupported variable type’.

The solution is to modify function uDADOADriver.DataTypeDaToOra as follows:

function DataTypeDaToOra(AType: TDADataType): Integer;
const
  Error = 'INTERNAL: not supported by DOA';
begin
  Result := otString;
  case AType of
    datUnknown: raise Exception.Create(Error);
    datGuid, datString,datFixedChar: Result := otString;
    datDateTime: Result := otDate;
    datSingleFloat, datFloat, datCurrency: Result := otFloat;
    datByte,
    datShortInt,
    datWord,
    datCardinal,
    datAutoInc,
    datInteger,
    datLargeInt: Result := otInteger;
    datBoolean: Result := otInteger; // needs a special handling
    datMemo: Result := otClob;
    datBlob: Result := otBlob;
    datXml,
    datWideMemo: Result := otClob;
    datFixedWideChar,
    datWideString: Result := otString;
    datLargeAutoInc, datLargeUInt,datDecimal: Result := otFloat;
  end;
end;

Posts: 3

Participants: 2

Read full topic

DOA Driver unable to handle blob fields

$
0
0

@Christen_Blom_Dahl wrote:

Current implementation of procedure uDADOADriver is unable to handle Blob fields. The correct implementation to handle those fields should be:

procedure SetDataSetParams(Params: TDAParamCollection; DataSet: TDataSet; aList: TThreadList);
var
  I: Integer;
  Ds: TOracleDataSet;
  ParamIndex, OraType: Integer;
  Name: string;
  LOB: TLOBLocator;
begin
  Ds := TOracleDataSet(DataSet);
  if Ds.Variables.Count > Params.Count then
    for I := Ds.VariableCount - 1 downto 0 do
      if Params.ParamByName(Ds.VariableName(I)) = nil then
        Ds.DeleteVariable(Ds.VariableName(I));

  for I := 0 to Params.Count - 1 do
  begin
    ParamIndex := Ds.VariableIndex(Params[I].Name);
    Name := HandleSqlName(Params[I].Name, Params[I].ParamType);
    OraType := DataTypeDaToOra(Params[I].DataType);
    // New Param
    if ParamIndex = -1 then Ds.DeclareVariable(Name, OraType);
    // Changed Param
    if (ParamIndex > -1) and (Ds.VariableType(ParamIndex) <> DataTypeDaToOra(Params[I].DataType)) then begin
      Ds.DeleteVariable(Params[I].Name);
      Ds.DeclareVariable(Name, OraType);
    end;
    if Params[i].DataType in [datWideString] then begin
      Ds.DeclareVariableCharSet(Name, ocfNational, ocsUTF16);
    end;
    // Set value
    if Params[I].DataType in [datXml, datWideMemo, datMemo] then begin
      if Params[I].DataType = datMemo then begin
        LOB := TLOBLocator.CreateTemporary(Ds.Session, otCLOB, True);
        Lob.AsString := Params[I].Value;
      end
      else begin
        LOB := TLOBLocator.CreateTemporary(Ds.Session, otNCLOB, True);
        LOB.CharSetID := ocsUTF16;
        Lob.AsWideString := Params[I].Value;
      end;
      aList.Add(LOB);
      Ds.SetComplexVariable(Name,Lob);
    end
    else if Params[I].DataType = datBlob then begin
      LOB := TLOBLocator.CreateTemporary(Ds.Session, otBLOB, True);
      if not (VarIsNull(Params[I].Value) or VarIsEmpty(Params[I].Value)) then
        Lob.AsString := Params[I].Value;
      aList.Add(LOB);
      Ds.SetComplexVariable(Name, Lob);
    end
    else if Params[I].DataType = datBoolean then
      Ds.SetVariable(Name, Integer(Params[I].Value))
    else
      Ds.SetVariable(Name, Params[I].Value);
  end;
end;

Posts: 3

Participants: 2

Read full topic

Problems with a custom login method w/.NET Core 2.1

$
0
0

@Chronicle wrote:

I am working on a .NET Core 2.1 client when I execute this code:

Using libraries from:

C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin.NETStandard
version: 9.4.109.1377

        var ls = CoLoginService.Create(lMessage, lChannel);
        var result = ls.LoginChronicle2(userId, password, UserTypeEnum.ChronicleMobileAndroid, out loggedInUserInfo, cvsl.ToArray());

I get this exception:

Unknown class found in stream: UserInfo. Either the corresponding .NET type is not defined or the TypeManager.TypeAssemblies collection has not been initialized properly.

Stack Trace:
   at RemObjects.SDK.TypeManager.CreateInstanceOfType(String typeName) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\TypeManager.cs:line 90
   at RemObjects.SDK.Serializer.CreateComplexTypeInstance(String className) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Serializers\Serializer.cs:line 400
   at RemObjects.SDK.BinSerializer.BeginReadComplex(String name, Type type, ComplexType& value) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Serializers\BinSerializer.cs:line 520
   at RemObjects.SDK.Serializer.ReadComplex(String name, Type type) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Serializers\Serializer.cs:line 587
   at RemObjects.SDK.Message.Read(String name, Type type, StreamingFormat format) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Messages\Message.cs:line 355
   at Chronicle.DataAccess.Remote2.LoginService_Proxy.LoginChronicle2(String userId, String password, UserTypeEnum LoginType, UserInfo& userInfo2, ChronicleKeyValueStrings[] ClientData) in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\Chronicle_DataAccess_Remote2_Intf.cs:line 11078
   at LatestLambdaClientTest.RO_Connections.ChronicleLogOn(String userId, String password) in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\RO_Connections.cs:line 60
   at LatestLambdaClientTest.RO_Connections..ctor(String urlTarget, String userName, String password) in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\RO_Connections.cs:line 28
   at LatestLambdaClientTest.ChronicleJob.CreateJob() in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\ChronicleJob.cs:line 121

Any idea whats going on?

Thanks,
Todd

Posts: 3

Participants: 3

Read full topic


Connection parametres in connection string are ignored with Unidac 7.3.10 and Schemamodeler

Making copies of entities in Schema Modeller?

$
0
0

@stuartclennett wrote:

Hi,

I have several (15 or more) entities in the Schema Modeller. Each is a join on several tables (so not Auto-SQL) and each has a lot of field properties set – I use the field custom attributes a lot in order to drive the display of data in the client.

I need to create a load more entities that are extended versions of the ones that exist (in other words, adding fields by adding more table joins in the SQL).

(Ideally SM should have a “Copy table…” function here)

I really do not want to have to create all these entities by hand again - SM is very painful & non-keyboard friendly when there’s lots of fields to edit (constantly having to switch between keyboard & mouse and no ability to add custom attributes to multiple fields at once, hence a lot of copy/pasting).

My thoughts were to copy the entire schema component to a new data-service and make the necessary changes, but ideally I’d like to have all the entities in the same schema.

Is it possible to create a copy of the .daSchema file and then somehow merge the two back together again? (Seems like it would be a painful process through a text editor)?

Thanks

Stuart

Posts: 4

Participants: 3

Read full topic

Combine schema and data from 2 seperate server calls

$
0
0

@developmentpas wrote:

Hi,

Remobjects/DataAbstract V9

We have a Delphi application server that has 2 calls
1- GetSchema (only returns the schema --> DataStreamer.WriteDataset(Screen.DatasetSchema, dataset, [woSchema]))
2- GetData (only returns the data --> dataStreamer.WriteDataset(result, dataset, [woRows], 100))
Standard these calls are being used with a TDARemoteDataAdapter from a Delphi client

From a web service we currently use teh following logic to get a datatable (using a completely different method on the appserver)

Binary activeDataSet = broker.WebGetData(…);
Streamer.InitializeStreamer(activeDataSet, StreamerInitialization.ReadFromBeginning);
DataTable table = new DataTable(tableName);
Streamer.ReadDataTable(tableName, table, true, true);

We now need to use the GetData call (that only returns the data) from the webservice and we can’t change the appserver at this moment.
How can I combine the GetData en GetSchema calls and obtain a valid DataTable from the C# webservice?

regards
Paul

Posts: 1

Participants: 1

Read full topic

Can I delete the delta?

$
0
0

@tobygroves wrote:

Ok strange request here, please don’t ask me why I need to do this.

I need to delete the delta on a table without applying or cancelling changes.

Basically I want to clear the delta, as if no changes have been made. I can’t call ApplyUpdates as I don’t want to apply them to the back end, nor can I call CancelUpdates as this reverts the changes in my client table.

Is there a way I can just bin the delta and nothing else?

Posts: 4

Participants: 2

Read full topic

Invalid implementation of TROXMLStreamer.SerializeSimpleType for set properties

$
0
0

@Christen_Blom_Dahl wrote:

Current implementation of the method serializes with the same code variant and set properties which is wrong.

The code

tkVariant, tkSet: begin
  aTargetNode.Value := GetVariantProp(anObject, lName);
end;

should be modified to:

tkVariant: begin
  aTargetNode.Value := GetVariantProp(anObject, lName);
end;

tkSet: begin
   aTargetNode.Value := GetSetProp(anObject, lName);
end;

Posts: 1

Participants: 1

Read full topic

TROXMLStreamer.DeserializeObject change the order in which properties are deserialized

$
0
0

@Christen_Blom_Dahl wrote:

This may cause problems with objects that rely in this order for the correct deserialization of their state.
The solution is to add an additional parameter to the GetPropList function:

cnt := GetPropList(PTypeInfo(anObject.ClassInfo), tkProperties, props, False);

Posts: 1

Participants: 1

Read full topic

Application (DA) killing connection to database after a few minutes - Devart - PostgreSQL

$
0
0

@adaptive wrote:

After a components upgrade (Devart and RemObject) my application started killing the connection after a few minutes for no apparent reason.
Tests were done with the old version of Devart, but the same problem is still happening.

There has been no change in the connection settings with the bank, we are suspicious that RemObject is setting some internal timeout setting in Devart.

The settings are the same (connection to the bank, load / volume of data) for the following combinations of components:

======= Connection Settings =======

ConnectionDefinition conexaoBD = new ConnectionDefinition();
conexaoBD.Name = “ConexaoBD”;
conexaoBD.Pool.MaxPoolSize = 10;
conexaoBD.Pool.WaitTimeOut = 600;

conexaoBD.ConnectionString = “DEVART_POSTGRESQL.NET?”;
conexaoBD.ConnectionString += “Host=localhost”;
conexaoBD.ConnectionString += “;Port=5432”;
conexaoBD.ConnectionString += ";Database=postgres;
conexaoBD.ConnectionString += “;User Id=postgres”;
conexaoBD.ConnectionString += “;Password=postgres”;
conexaoBD.ConnectionString += “;Unicode=True;Persist Security Info=True;Schema=public;Pooling=false;UnpreparedExecute=true;Max Pool Size=100;Connection Timeout=15;Default Command Timeout=0;”;
conexaoBD.Default = true;

connectionManager.ConnectionDefinitions.Add(conexaoBD);

connectionManager.PoolingBehavior = RemObjects.SDK.Pooling.PoolBehavior.RaiseError;
connectionManager.PoolTransactionBehaviour = PoolTransactionBehaviour.Rollback;
connectionManager.WaitIntervalSeconds = 10;
connectionManager.PoolingEnabled = false;
connectionManager.MaxPoolSize = 5;
connectionManager.ConnectionPoolTimeout = 600;

======= Components =======

  • Success

  • Devart: 7.7.819.0 or higher

  • RemObjects Data Abstract for .NET, Server Edition - 9.1.99.1273

  • PostgreSQL 10.3

  • Error

  • Devart: 7.7.819.0 or higher

  • RemObjects Data Abstract for .NET, Server Edition - 9.4.109.1377

  • PostgreSQL 10.3

  • This set of components generate the error described below

======= Application log =======

Devart.Data.PostgreSql.PgSqlException (0x80004005): Server did not respond within the specified timeout interval. —> System.TimeoutException: Server did not respond within the specified timeout interval. —> System.IO.IOException: Unable to read transport connection data: A connection attempt failed because the connected component did not respond
correctly after a period of time or the established connection failed
because the connected host did not respond. —> System.Net.Sockets.SocketException:A connection attempt failed because the connected component did not respond
correctly after a period of time or the established connection failed
because the connected host did not respond
em System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
em System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
— Fim do rastreamento de pilha de exceções internas —
em System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
em Devart.Common.z.a(Byte[] A_0, Int32 A_1, Int32 A_2)
— Fim do rastreamento de pilha de exceções internas —
em Devart.Common.z.a(Byte[] A_0, Int32 A_1, Int32 A_2)
em Devart.Common.f.c(Byte[] A_0, Int32 A_1, Int32 A_2)
em Devart.Common.n.d(Byte[] A_0, Int32 A_1, Int32 A_2)
em Devart.Data.PostgreSql.PgSqlDataReader.f(Int32 A_0)
em Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
em Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
em Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
em Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
em System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

======= PostgreSQL log =======
2018-10-25 14:05:58.432 -03 [12688] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
2018-10-25 14:05:58.433 -03 [6604] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
2018-10-25 14:06:26.291 -03 [13196] LOG: could not send data to client: An existing connection was forcibly closed by the remote host.
2018-10-25 14:06:26.291 -03 [13196] FATAL: connection to client lost

Is there any configuration of transaction / connection timeout or something of the type that implicitly changed in this new version of RemObjects?

Posts: 3

Participants: 2

Read full topic


DA Scheme Modeler not recoginzing Top N

$
0
0

@estebanp wrote:

Hi,

Latest RODA, Delphi using MSSQL 2016.

I have a stored procedure that goes something like

SELECT TOP (@TOPN) Field1, Field2, Field3
FROM Atable
WHERE Atable.Key = @Key
ORDER BY Something DESC

Without the TOP statement if I drag and drop this sp to the tables section it detects all the fields, and everything works fine, with the TOP (@TOPN) statement I get an error message saying that it cant deal with the Custom sql and the fields are note detected.

It seems that Scheme Modeler doesnt understand TOP.

Posts: 2

Participants: 2

Read full topic

Data Abstract Schema Modeler 8.3.91.1167

$
0
0

@AllenKnapple wrote:

Will the Data Abstract Schema Modeler 8.3.91.1167 Connections Manager connect to a ElevateDB Unicode Database? If so, how do I build the connection string?

(I’m using the Native driver not the .Net driver)

Thank you!

Posts: 1

Participants: 1

Read full topic

Connecting DataAbstract to a Datasnap server

$
0
0

@mahmoud_EL_SAWAH wrote:

Hello everyone
We just acquired DataAbstract to create our iOS app.
The issue is our database server is a datasnap server, as i’m Kinda new to this whole DataAbstract thing, I need to understand if it’s possible to connect DataAbstract to the datasnap server?
If yes how would you recommend doing it?
If no, then what is the possible solution, as we don’t want to change the server (it handles our desktop client).
Thanks for your help.

Posts: 1

Participants: 1

Read full topic

Can I depend on updates being applied in the order I made them?

$
0
0

@tobygroves wrote:

I have a scenario where I may make multiple updates to a single table but the order in which they’re applied is critical. Basically I have a table where only a single record may have a boolean field set to True, so if this is to change, I must set the old record’s field to False before setting the new record’s to True or it’ll fail.

So, if I ensure that my code always makes these two updates in the correct order, can I rely on the server’s delta & change processing to apply them in that order?

Posts: 4

Participants: 2

Read full topic

Is databastract server compatible with net core?

$
0
0

@DonaldShimoda wrote:

Im starting a new project and want to know that. Also will appreciate if somebody test on raspberry pi will help.

Best regards

Posts: 3

Participants: 2

Read full topic

Viewing all 1235 articles
Browse latest View live