Librería C# para usar en VO 28

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
gjbiagiotti
Posts: 33
Joined: Thu Aug 15, 2019 10:16 pm

Librería C# para usar en VO 28

Post by gjbiagiotti »

Hello.
We are designing a C# library, exposed to COM, for handling SQL, to be used in VO 28 SP3.
We made the functions PG_Connect() and PG_Select(). This function returns a DataSet object.
At VO we use it for Automation.

After making the connection, we call the PG_Select() function which returns a dataset:

LOCAL oTable AS OBJECT

IF !oGVar:oSPI_SQL:PG_Select("Select * from customer order by razsoc_cli") //FALSE without error
oTable := oGVar:oSPI_SQL:Data
WILL END IF

SELF:oDCbBrowser1:use(oTable)

When trying to read the dataset returned by the library, with the bBrowser, the following error appears:
Error Code 16 [NO EXPORTED VARIABLE]
SubSystem: BASE
Function: IVAGET
Argument:USED

Is it possible to read, from VO, the data set returned by the library?
What should I take into account in the library so that VO can read a data set?

Thank you so much.
Gerardo.
Sherlock
Posts: 63
Joined: Mon Sep 28, 2015 1:37 pm
Location: Australia mate... fare dikkum

Librería C# para usar en VO 28

Post by Sherlock »

Geraldo

I provided all source to Fabrice for POSTGRES dataserver system that fully works.
No need for COM ... native support for PG.
What X# does with its PG future I have supplied my code.
But out of the box it works wth ReportPro, Browser.
Been using for years.

In my App I have mySQL native support and PG
I ship .libpq.ddl and pgConnector.dll

no COM or ODBC.. full native support.

Syntax can be very familiar DBF

oPGSQLConn := PgConnection{ "localhost", "WFalls_LiveData", "postgres", "Goodpassword”, "public", "5432", FALSE}
//
IF oPGSQLConn:IsConnected
//
cQuery := [SELECT * FROM sherdata.creditors_full] // ORDER BY "creditorname" ASC;]
oPGCreditor := PgSelect{ cQuery , oPGSQLConn }
//
IF oPGCreditor:Used
DO WHILE ! oPGCreditor:EOF
cCreditorName := AllTrim(oPGCreditor:FIELDGET(1)) // 'creditor_name')
cAddr1 := AllTrim(oPGCreditor:FIELDGET(#addressline1))
oPGCreditor:Skip()
ENDDO
oPGCreditor:close()
ENDIF
oPGSQLConn:Close()
ENDIF

Phil McGuinness
Phil McGuinness
gjbiagiotti
Posts: 33
Joined: Thu Aug 15, 2019 10:16 pm

Librería C# para usar en VO 28

Post by gjbiagiotti »

hi phil
Thanks for your answer.
Where can I get the Fabrice libraries you mention?

Thanks
Gerard
gjbiagiotti
Posts: 33
Joined: Thu Aug 15, 2019 10:16 pm

Librería C# para usar en VO 28

Post by gjbiagiotti »

hi phil
Where can I get the Fabrice libraries you mention?

Thanks
Gerard
Post Reply