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

BinMessage: Unexpected end of stream

$
0
0

@ios-shivam wrote:

Hello ,

As I am trying to connect with local relativity server on my system from xcode with DARemoteDataAdapter , Please find the code snippet

    rda = DARemoteDataAdapter(targetURL: URL(string: "http://localhost:7099/bin")!)
    rda.username = "Administrator"

@objc func remoteDataAdapterNeedsLogin(_ adapter: DARemoteDataAdapter) -> Bool {
return rda.login(withUsername: “my user name”, password: “password”, connectionName: “Tasks”)

}

Here . in connectionName i have provided my schemas name.

In the below function I am geeting exception error
@objc func remoteDataAdapter(_ adapter: DARemoteDataAdapter, requestDidFailWith exception: NSException) {

//Error comes :- ################################
An exception occurred on the server: BinMessage: Unexpected end of stream.
(
0 CoreFoundation 0x00000001046e01bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000103c86735 objc_exception_throw + 48
2 RemObjectsSDK 0x0000000103357a43 -[ROMessage readFromNSData:] + 0
3 RemObjectsSDK 0x000000010336107e -[ROHTTPClientChannel intDispatch:responseMessage:] + 196
4 RemObjectsSDK 0x000000010336b555 -[ROClientChannel dispatch:] + 397
5 DataAbstract 0x00000001032bda65 -[SimpleLoginService_Proxy Login:::] + 344
6 DataAbstract 0x000000010329e22c -[DARemoteDataAdapter loginWithUsername:password:] + 114
7 DataAbstract 0x000000010329e0ff -[DARemoteDataAdapter login] + 786
8 DataAbstract 0x00000001032a2f6d -[DARemoteDataAdapter clientChannelNeedsLogin:] + 26
9 RemObjectsSDK 0x000000010336ba7f __73-[ROClientChannel internalPerformAsynchronousLoginNeededForAsyncRequest:]_block_invoke_2 + 205
10 libdispatch.dylib 0x0000000105ce3595 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x0000000105ce4602 _dispatch_client_callout + 8
12 libdispatch.dylib 0x0000000105ce7064 _dispatch_queue_override_invoke + 1028
13 libdispatch.dylib 0x0000000105cf500a _dispatch_root_queue_drain + 351
14 libdispatch.dylib 0x0000000105cf59af _dispatch_worker_thread2 + 130
15 libsystem_pthread.dylib 0x00000001060d36ee _pthread_wqthread + 619
16 libsystem_pthread.dylib 0x00000001060d3415 start_wqthread + 13

//Error Ends :- ################################

}

Is anybody have idea about.
Xcode version :- 10.1
Swift version :- 4.x

With server explorer I can view all domain and textconnectioon also. It show Connection is operational.

Posts: 1

Participants: 1

Read full topic


Error: exception occurred on the server: specified method is not supported

Convert Delphi standard "UpdateData" to C#

$
0
0

@developmentpas wrote:

Hi,

I am trying to create a simple POC so that we can decide if we can move forward replacing our DataAbstract server in Delphi with a C# version, while keeping (or the time being) our clients in Delphi.

On the server side we have this relatively simple piece of code that deals wit database changes and is called from a TDARemoteDataAdapter. I tried to convert this to C# code, couldn’t find a fast way to do this and I couldn’t find any examples.

I would appreciate some help…
regards

Paul Sjoerdsma


function TPSPUserDataBroker.UpdateData(const Delta: Binary): Binary;
var
  updateDelta : IDADelta;
  tableName : string;
begin
  result := Nil;

  DataStreamer2.Initialize(Delta, aiReadFromBeginning);

  // Check if we need to do anything
  if DataStreamer2.DeltaCount = 0 then
  begin
    CodeSite.ExitMethod(Self, 'UpdateData');
    Exit;
  end;


  tableName := ......

  updateDelta := NewDelta(tableName);
  DataStreamer2.ReadDelta(DataStreamer2.DeltaNames[0] , updateDelta);
  DataStreamer2.Finalize;
  try
    try
      // Process delta internally
	  .........

      updateDelta.Changes[0].Status := csResolved;
    except
      updateDelta.Changes[0].Status := csFailed;
      raise;
    end; // try-except
  finally
    result := Binary.Create;

    DataStreamer2.Initialize(result, aiWrite);
    DataStreamer2.WriteDelta(updateDelta);
    DataStreamer2.Finalize;
  end; // try-finally
end;

Posts: 1

Participants: 1

Read full topic

SQL not validating backslash characters correctly

$
0
0

@tobygroves wrote:

Similar to the issue described here:

It seems the SQL parser in the schema modeler doesn’t like backslash characters.

If I use this type of construct:

SELECT Column1 + ‘’ + Column2 FROM…

This fails to validate despite being perfectly valid T-SQL.

I’m using DA 9.4.109.1375 on Delphi 10.3.2 Enterprise using FireDAC against an MSSQL database.

Posts: 5

Participants: 2

Read full topic

Breaking change in 9.5.111.1397 RTM

$
0
0

@EvgenyK wrote:

DataAbstract for Delphi 9.5.111.1397

Parameter of the TDARemoteCommand.Execute method was changed from in to out direction:

was:

function Execute(aCommandName: string; aInputParameters: DataParameterArray;
                           aOutputParameters: DataParameterArray): Integer; override;

now:

function Execute(aCommandName: string; aInputParameters: DataParameterArray;
                           out aOutputParameters: DataParameterArray): Integer; override;

Make sure that if you are using this method, you don’t create aOutputParameters before execution of this method and destroy aOutputParameters object after execution of this method, like

lOutputParameters := nil;
try
  // filling lInputParameters
  DARemoteCommand.Execute(lCommandName, lInputParameters, lOutputParameters);
  // processing lOutputParameters
finally
  lOutputParameters.Free;
end;

Posts: 3

Participants: 2

Read full topic

How to use TableRequestInfo UserFilter to add an or where clause

$
0
0

@marcantheunis wrote:

I m using RO 9.4 and want to add an extra where clause by using DA4’s TableRequestInfo.UserFilter but this clause gets added with an AND condition.

How can I pass a complex OR condition from RO client side to the RO server side and have it appended to the SQL where clause correctly?

Posts: 2

Participants: 2

Read full topic

Upgrading RODA stream read erro

$
0
0

@marcantheunis wrote:

hi,
i’m upgrading from
RODA 9.4.107.1363 to
RODA 9.5.111.1399

i wasn’t expection any problem but i get stream errors when i want to save data
also, i’m still depending on DA3 (this fails on startup app btw)

it crashes in
:004d067c TWriter.WriteVariant + $54
uDABinAdapter.Writer_WriteVariant(???,Variant array of Byte)
uDABinAdapter.VariantToWriter(???,Variant array of Byte,$ACB3110)
uDABinAdapter.TDABinDataStreamer.DoWriteDelta(TDADelta($A36F030) as IDADelta)
uDADataStreamer.TDADataStreamer.WriteDelta(???)
uDADataStreamer.TDADataStreamer.WriteDelta(???,TDACDSDataTable($6EEA490) as IDADataset)

calling code:
FStream := Binary.Create;
LocalAdapter.WriteDelta(FStream,LocalDataTable);
localdatatable is a TDACDSDataTable

it’s a service that updates data serverside…

Posts: 8

Participants: 3

Read full topic

DA schema builder crash


Dataabstract schema builder warning

TDAESQLCommand weak reference

Delphi RIO slow DA datamodule loading

Issue with transactions during update

$
0
0

@tobygroves wrote:

I’m having a strange issue with transactions. I’m using Delphi 10.2.3 with FireDAC against an MSSQL database.

I have a delta which I’m applying with an ApplyUpdates call. Obviously all of the delta/change processing on the server takes places within a transaction. This is fine.

However, whilst processing this update, my business processors may need to execute a schema command. This command is executed within the context of the service instance (by assigning the TDALocalCommand’s ServiceInstance property) so that it would operate within the context of the existing service instance and its transaction.

What appears to be happening is that this call is totally screwing up the transaction as it’s wrapped in a begin/commit pair. Tracing it in SQL profiler, it appears this commits the “main” transaction and the remaining changes are then processed outside of the transaction.

Can you confirm what’s going on here? Surely the command should simply execute within the context of the existing transaction, not attempt to start it again and then commit it.

Posts: 1

Participants: 1

Read full topic

DataAbstract and FastReport 6

$
0
0

@claudio.piffer wrote:

Hi,

I have installed the last official release of the DataAbstract (9.5.111.1399) and FastReport (6.2.11) in Delphi 10.3 Rio.

I installed also the FastReport DA Adapter without problems.

But if I try to drag&drop the daDatabase component in FRX Designer without problems the same operation is not possibile with a daTable component.

Have you a suggestion to solve this?

Best Regards and Merry Christmas

Posts: 2

Participants: 1

Read full topic

DataAbstract "not a legal oleaut date" exception

$
0
0

@afree wrote:

Hello.
When I look up data from a database, this “not a legal oleaut date” exception occurs.
WriteDataReader or WriteDataTable in Bin2DataStreamer.
Is there a way to avoid this exception without fixing data?
DataAbstract 9.5.111.1397 , c# Winform.

Posts: 1

Participants: 1

Read full topic

DA TfrxDATable and FastReport 6

$
0
0

@claudio.piffer wrote:

Hi,

how can I use the {where} parameter (or a custom server parameter) in a TfrxDATable inside a fr3 report? Have you some samples?

I use last official DA and FastReport 6.2.13 in Delphi 10.3 Rio

Posts: 1

Participants: 1

Read full topic


Setting optional ADO connection parameters

$
0
0

@aolson wrote:

I am using RelativityServer (latest beta) to connect to my Pervasive.SQL database server via ADO.NET. All is working well, but I’ve run into a query that takes awhile to finish, and i’m getting exceptions when the default timeout expires. There is a parameter on the PSQL command object that I need to set called CommandTimeout and I wish to set it to zero. Can this be done in the DataAbstract.daConfig file?

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: 8

Participants: 2

Read full topic

Briefcase password and encryption

$
0
0

@hamberg wrote:

How can I put a password and encrypt a local briefcase file so it is encrypted at rest on the local workstation?

Posts: 1

Participants: 1

Read full topic

Problem with TDAEDOADriver and null values for Memo parameters

$
0
0

@Christen_Blom_Dahl wrote:

There is an error in function uDADOADriver.SetDataSetParams: In case the DataType of the parameter is in [datXml, datWideMemo, datMemo] a Null value raises an exception. Code should be modified as follows:

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);
        if not (VarIsNull(Params[I].Value) or VarIsEmpty(Params[I].Value)) then
          Lob.AsString := Params[I].Value;
      end
      else begin
        LOB := TLOBLocator.CreateTemporary(Ds.Session, otNCLOB, True);
        LOB.CharSetID := ocsUTF16;
        if not (VarIsNull(Params[I].Value) or VarIsEmpty(Params[I].Value)) then
          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

Problem with TDAEDOAConnection.CreateCompatibleQuery

$
0
0

@Christen_Blom_Dahl wrote:

There is an error in function TDAEDOAConnection.CreateCompatibleQuery. Currently the code of this function calls again OracleSession.LogOn this forces the connection to close the current session and login again into Oracle. This creates a problem for pending commits and some queries thad depend on current Oracle session like queries that ask for current sequence values.
The correct code for this function should be:

function TDAEDOAConnection.CreateCompatibleQuery: IDAServerDataset;
begin
  Result := inherited CreateCompatibleQuery;
end;

Posts: 4

Participants: 3

Read full topic

Viewing all 1235 articles
Browse latest View live