Search found 9 matches

by Flub
Wed 17 Nov 2021 09:05
Forum: Entity Developer
Topic: MSSQL table type parameters
Replies: 1
Views: 14549

MSSQL table type parameters

Hi,
I am new to Entity Developer and like it a lot.
However I came to a problem I don't know how to solve and I really need a solution as 90% of my MS SQL procs uses them: Table-type parameters. For example:
CREATE TYPE [dbo].[IDs] AS TABLE([id] bigint NOT NULL);
CREATE PROCEDURE [dbo].[pTestIDs] (
@IDs dbo.IDs READONLY
) AS BEGIN
-- Do whatever with @IDs table content...
END;
I unfortunately could not import directly my MSSQL types in ED, but did it however manually, creating Complex types.

In ED, the pTestIDS @IDs parameter data type is set automatically to "Object", but cannot be changed to structured.
As such, in ASP.Net Core, generated code creates a:
DbParameter sortParameter = cmd.CreateParameter();
sortParameter.DbType = DbType.Object;

But what would be needed is this:
if (IDs != null) {
SqlParameter sortParameter = new SqlParameter();
sortParameter.ParameterName = "ids";
sortParameter.SqlDbType = SqlDbType.Structured;
sortParameter.Value = ids;
sortParameter.Direction = ParameterDirection.Input;
}

Of course I could do it manually in the code, but I loose the possbility to re-generate C# classes...
Do you have an example on how to load the DbType.Object with a List<IDs> in ASP.Net Core or is there a way to generate the code from ED as a SqlDbType.Structured?

Thanks a lot!
by Flub
Tue 29 Jul 2014 09:04
Forum: SecureBridge
Topic: SFTP server error occured: Invalid file ID
Replies: 5
Views: 6784

Re: SFTP server error occured: Invalid file ID

Hey Dmitry,

I've sent you the connection parameters about a few days ago. Did you manage to have an attempt and see why it does not work?

Thanks
by Flub
Thu 24 Jul 2014 07:50
Forum: SecureBridge
Topic: SFTP server error occured: Invalid file ID
Replies: 5
Views: 6784

Re: SFTP server error occured: Invalid file ID

Dear,

I have tried using the demo to connect and upload, but it failed (But still works w/ i.e. FileZilla).

Connecting w/ SSH is OK.
Starting SFTP is OK.

But as soon I try to upload a file it returns a software error!

Can I provide you with my credentials on this SFTP server so you can have a try using a different mean (for obvious security reasons)? I.e email? To what address?

Thanks
by Flub
Thu 10 Jul 2014 13:32
Forum: SecureBridge
Topic: SFTP server error occured: Invalid file ID
Replies: 5
Views: 6784

SFTP server error occured: Invalid file ID

Dear Sir,

I am trying to use SecureBridge in order to upload a file w/ SFTP
Each attempt returns: 'SFTP server error occured: Invalid file ID'
And I cannot find any help on the error code anywhere.
Of course, strFilename conatains a valid file path.

I have no problem doing the upload using i.e. filezilla and the same credentials I use programmatically.

Do you know what could be wrong?

Code is very simple:

ScSSHClient1.HostName := strHostName;
ScSSHClient1.User := strUsername;
ScSSHClient1.Password := strPassword;
ScSSHClient1.KeyStorage := ScFileStorage1;
ScSSHClient1.Connect;

ScSFTPClient1.Initialize;

ScSFTPClient1.UploadFile(strFilename, ExtractFileName(strFilename), False);

procedure TfrmMain.ScSSHClient1ServerKeyValidate(Sender: TObject; NewServerKey: TScKey; var Accept: Boolean);
var
Key: TScKey;
fp, msg: string;
begin
Key := ScSSHClient1.KeyStorage.Keys.FindKey(ScSSHClient1.HostName);
if (Key = nil) or not Key.Ready then begin
NewServerKey.GetFingerPrint(haMD5, fp);
Key := TScKey.Create(nil);
Key.Assign(NewServerKey);
Key.KeyName := ScSSHClient1.HostName;
ScSSHClient1.KeyStorage.Keys.Add(Key);
Key.Free;
Accept := True;
end;
end;

Thanks, thanks, and once again... Thanks...
by Flub
Wed 29 Oct 2008 11:00
Forum: Oracle Data Access Components
Topic: ODAC and Fast Reports...
Replies: 2
Views: 1982

Hi Plash, and many thanks...

It works indeed. Just did the simple following code:

frxODACDatabase := TfrxODACDatabase(frxReport.FindObject (strFrxDatabaseName));
frxODACDatabase.Server := oraSession.Server;
frxODACDatabase.Username := oraSession.Username;
frxODACDatabase.Password := oraSession.Password;

I thought about replacing the object first because I believed this kind of code would have opened two active sessions, but it doesn't. It just opens one active session indeed (I've checked my Oracle active sessions).

By the way, for over 4 and a half year I am a customer, I needed your help three times, and three times my trouble was solved within the next day. Frankly, this is the best customer support I have ever experienced as a software developper, and this is really much appreciated!

Thanks! Thanks! Thanks!
by Flub
Tue 28 Oct 2008 12:56
Forum: Oracle Data Access Components
Topic: ODAC and Fast Reports...
Replies: 2
Views: 1982

ODAC and Fast Reports...

Hello there,...

My current software is running reports using DLLs that generates PDF files.
To ease report development, we wanted to add FR3 functionality to that. Meaning, the software would run external FR3 files from a specific folder.

All is working perfectly well except one thing, and a big one...

The host software connects to one database only, and we have several independant databases servers, meaning the FR3 report must therefore be able to run on the database object given by the host application.

My solution was to use a simple function like this one to change the database the report was based onto...:

procedure TForm2.SetFR3Object(strObjectName: string; pObject: Pointer);
Var intX: Integer;
begin
for intX := 0 to Pred (frxReport1.AllObjects.Count) do begin
If SameText(TComponent(frxReport1.AllObjects[intX]).Name,strObjectName) then begin
frxReport1.AllObjects[intX]:=pObject;
exit;
end;
end;
Raise Exception.Create('Object '+strObjectName+' not found.');
end;

procedure TForm2.FormCreate(Sender: TObject);
Var fodTemp: TfrxODACDatabase;
begin
fodTemp := GetFR3Object ('ODACDatabase1');
SetFR3Object('ODACDatabase1', Nil); // Just test the function by setting to Nil the ODACDatabase1 object from the FR file
SetFR3Object('ODACDatabase1', fodTemp); // And then restore backed up pointer
end;

This function compiles perfect, code seems ok... But... the line from SetFR3Object procedure:
frxReport1.AllObjects[intX]:=pObject;
does not do what it is supposed to do. The pointer does not change as expected!

In other words, how can I replace an ODAC database component from the report file (.FR3) loaded into memory with a TfrxODACDatabase created in my host application?

Thanks!
by Flub
Fri 01 Sep 2006 09:10
Forum: Oracle Data Access Components
Topic: OCI_INVALID_HANDLE with TSmartQuery saving to a BLOB
Replies: 2
Views: 3819

The "guest" is me...

I think my session expired when I added the post yesterday.
So now the "guest" has a name... It's me...
by Flub
Wed 07 Jun 2006 15:32
Forum: Oracle Data Access Components
Topic: SmartRefresh blocks thread...
Replies: 2
Views: 1791

Case closed...

Hi,


I have moved to another workstation and now it everything works... Very strange.

Trouble was with an Oracle 9i database, XP, Delphi 7 SP1... The same config as on the computer I use now, so I guess it must be dependant of some registry error or like (If you don't hear the same problem from somebody else).

Thanks anyway.
by Flub
Thu 01 Jun 2006 14:54
Forum: Oracle Data Access Components
Topic: SmartRefresh blocks thread...
Replies: 2
Views: 1791

SmartRefresh blocks thread...

Hi there,

I wanted to use the SmartRefresh feature of TSmartQueries into one of my project, but I have a trouble using it... (w/ Registered 5.70.1.33) :

What happens is exactly the same as w/ the demo project so my guess is that it comes whether from the ODAC component or from my Oracle configuration itself... Maybe you can help?

When I launch the SmartRefresh demo (I have just changed the SQL in the TSmartQueries to connect to a table of mine instead... [SELECT * FROM MY_TABLE]), the software hangs with the TSmartQuery.Open method (The SQL hourglass waiting but other applications still runs properly [No freeze]...).

It never comes back from this method... Snif.

As soon as I change the property SmartRefresh to False and start the project again, then the queries opens instantly.

Do you know where it might come from?

Thank you very much

Olivier