Datawindow - datasource - storedprocedure error - cannot create datawindow - stored-procedures

While applying the datawindow datasource as a procedure, the following error message will show.
The version we are using the version is PowerBuilder 11.5 and Oracle 9i
I just changed the PBDBMS.PUT_LINE() to REF CURSOR
DataWindow Wizard
Cannot create Datawindow.
How to resolve this?

Related

Delphi App Upgrade from Delphi 10 Seattle to Delphi 13.3.3 Rio - SQL Server Db Column with Space(s) not working in ClientDataSet and SimpleDataSet

We are upgrading our Working Delphi App from Delphi 10 Seattle to Delphi 13.3.3 Rio - SQL Server Db Column with Space(s)
The code associated with this issue works as intended in Delphi 10 Seattle and SQLServer.
The problem is that the Column "Image Type" has a space in its name.
I am looking to solve the space in column names for ClientDataSet and SimpleDataSet
This applies to other table that we have. I know that a parameterized SQL would work as a workaround.
The following Insert SQL Execute statements work as intended.
INSERT INTO tblImages ("Line","Image Type","Image") VALUES ('1','jpg','imageBlobValue')
or
INSERT INTO tblImages ([Line],[Image Type],[Image]) VALUES ('1','jpg','imageBlobValue')
The following Insert via ClientDataSet Does not
//Query
SQLQueryInsert.Cose;
SQLQueryInsert.SQL:='SELECT "Line","Image Type","Image" FROM tblImages';//Oracle & Other SQLs
SQLQueryInsert.SQL:='SELECT [Line],[Image Type],[Image] from tblImages';//SQLServer
SQLQueryInsert.Open;
//Set Non parameterized values
//DataSet
ClientDataSettblImages.Close;
ClientDataSettblImages.Open;
ClientDataSettblImages.Insert;
ClientDataSettblImages['Line']:='1';
ClientDataSettblImages['Image Type']:='jpg';
ClientDataSettblImages['Image']:='imageBlobValue';
//Apply Updates
ClientDataSettblImages.Post;
If ClientDataSettblImages.ChangeCount > 0 then
Begin
ClientDataSettblImages.ApplyUpdates(-1);
End
If I look at the text output of SQLMonitor I can see the following:
Error: SQL State: 1, SQL Error Code: 156, Level: 15, Procedure: , Line: 2
Incorrect syntax near the keyword 'Type'.
ClientDataSet & SimpleDataSet have the same issue. I can see that the problem is the column with the space called "Image Type". The insert via the ClientDataSet works fine without the column "Image Type".
This either looks like a ClientDataSet bug or I'm missing a simple detail somewhere.
Looks like the answer is to add the following Parameter to SQLConnection: UseQuoteChar=True. The Application is now working as intended.

Zeoslib new version encoding problem, strange charaters

I have installed Zeoslib 7.2.4 because of updating to Delphi 10.2 and after testing my projects the result of SELECT isn't expected. The previous version 7.1.4 Works fine.
The results after updating to 7.2.4:
Connection ClientCodePage is binary. If I change this to utf8 the results will look like this, The Address col is correct but Title is still corrupted:
The database and table collation is latin1_swedish_ci. I don't have a problem with version 7.1.4. One workaround for this problem is this:
TEncoding.Default.GetString(DBQuery.FieldByName('Title').AsBytes)
This is the expected result:

Connect to excel 2007 file using ADOConnection in Delphi7

I want to connect to an excel 2007 file(.xlsx) using delphi 7, so I used a AdoConnection and set its connectionstring property as:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test\qm\Results-summary.xlsx;Extended Properties="Excel 12.0;IMEX=1";Persist Security Info=False
But when I active the AdoConnection i get this error:
Could not find installable ISAM.
Where is the problem?
I found the solution. my mistake was using Microsoft.Jet.OLEDB.4.0 driver for excel 2007 file. I changed it to Microsoft.ACE.OLEDB.12.0 driver and set the extended property to Extended Properties="Excel 12.0 Xml;HDR=yes", now my connection string is:
Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=C:\test\qm\Results-summary.xlsx;Mode=Share Deny None;Extended Properties="Excel 12.0 Xml;HDR=yes";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=37;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data=False
and it works:)

"Operation Not Applicable" Exception

I'm developing an application in the delphi6.
I've a ClientDataSet (cds), a DataSetProvider (dsp) and a DataSource (ds) that ds's DataSet is cds and cds's ProviderName is 'dsp'.
I add some records to the cds on some specified conditions.
After I set a filter for the cds and set it's Filtered property to True, when I want to close it, it raise an exception by "Operation Not Applicable" message even I clear the Filter property and set the Filtered property to false.
How can I close the ClientDataSet without error?
ONA error comes from midas.dll and I had it quite often until I switched to my own implementation
you could try midas.dll from newer versions of delphi

Class Type Expected error on TableAdapter constructor

I am using Delphi Prism to connect to an Advantage Database Server. I created a connection using the server explorer to the database. I added a dataset object to my project and added a table to the dataset. Everything works fine in the IDE, however, I get an error in the generated designer code on the table adapter constructor.
The error is: (PE26) Class type expected.
Here is the generated code:
{ Presidents.PresidentsTableAdapters.USPRESIDENTSTableAdapter }
constructor Presidents.PresidentsTableAdapters.USPRESIDENTSTableAdapter;
begin
self.ClearBeforeFill := true;
end;
does it help to leave out the "self."? i would expect "self." is unnecessary. i use it only rarely.
Can you show the full file? The error says that "Presidents.PresidentsTableAdapters.USPRESIDENTSTableAdapter" is not a known class type.

Resources