Xbase++ Workarea and ADO dataset

This forum is for eXpress++ general support.
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Xbase++ Workarea and ADO dataset

#1 Post by unixkd »

Hi all

I have a control that accepts and ADO dataset as a parameter. Can anybody tell me how to convert an Xbase++ workarea to an ADO dataset in 1.9SL1 ?

Joe.

patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Re: Xbase++ Workarea and ADO dataset

#2 Post by patito »

Hi
Post a simple example and one using activex browse, hopes this is what you need
If you want to use dc browse, you must modify

Best regards
Hector
Attachments
ado.rar
source ado.prg
(259.1 KiB) Downloaded 754 times

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Xbase++ Workarea and ADO dataset

#3 Post by unixkd »

NOT what I am looking for.

I use ADSDBE with Advantage Database Server. Now I have an activex control that accepts ADO recordset as parameters. I open my tables via ADSDBE and
I just wonder if there is a way to translate a workarea to ADO recordset ?

Joe.

patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Re: Xbase++ Workarea and ADO dataset

#4 Post by patito »

Hi

you can use ado with advantage odbc driver
(free distribution )

greetings
Hector

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Xbase++ Workarea and ADO dataset

#5 Post by rdonnay »

Here's a program that uses the ADO ActiveX control that's built into Microsoft Windows.

This program reads a database named BookSale.Mdb.

I'm working on a sample that will create an ADORecordSet from a Dbf.

Code: Select all

#INCLUDE "dcdialog.CH"

#DEFINE adCmdText  1

#Pragma Library("ascom10.lib")

FUNCTION Main

LOCAL oADOConnection, oADORecordset, oADOFields, oADOField, value

// Creating the wrapping class instance for the ADO connection.
oADOConnection := ActiveXObject():create('ADODB.Connection')

// Opening the ADO connection, targeting an Access database.
oADOConnection:ConnectionString := ;
   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+DC_CurPath()+"\BookSale.mdb"

oADOConnection:Open()

// Creating a new ADO Recordset
oADORecordset := ActiveXObject():create('ADODB.Recordset')

// Filling the ADO RecordSet with the result of an SQL request executed through the newly opened ADO connection
oADORecordset:Open("SELECT * FROM Publishers ORDER BY Name",oADOConnection,,,adCmdText)

oADORecordset:MoveFirst()
DO WHILE .NOT. oADORecordset:EOF
  // Obtaining the 'Name' field value of the current record
  value := oADORecordset:Fields("Name"):Value
  // Dumping the field value to the screen
  ? "oADORecordset:Fields('Name'):Value=" + value
  // Move to the next record
  oADORecordset:MoveNext()
ENDDO

// Required: release the ADO RecordSet ActiveX
oADORecordset:Destroy()

// Required: close and release the ADO Connection ActiveX
oADOConnection:Close()
oADOConnection:Destroy()

wait

return nil
Attachments
booksale.zip
(92.7 KiB) Downloaded 746 times
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1414
Joined: Wed Feb 24, 2010 3:44 pm

Re: Xbase++ Workarea and ADO dataset

#6 Post by Auge_Ohr »

unixkd wrote:Can anybody tell me how to convert an Xbase++ workarea to an ADO dataset in 1.9SL1 ?
ALIAS belong to DBE and we do not have Information about DBE API.
as Roger say you can build a Record Set ( Dataset() ) from Result Set.

for pgDBE we got this Information :
Re: New build 470: furthermore errors with PGDBE
preview.xbase++.20
24. Oktober 2013
Till Warweg

Universal SQL exists in two flavors (local and
remote) and the behaviour differs in terms
of which form a result set can be retrieved in.

As a general rule:
1. Remote SQL: result sets can currently only be
retrieved as a work area
2. Local SQL: results can currently only be retrieved
as an array, an array of objects, or as a single value
greetings by OHR
Jimmy

patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Re: Xbase++ Workarea and ADO dataset

#7 Post by patito »

Hi
Attach bitmap with Ado and FlexGrid activex
sources above, this FlexGrid prg and prueba.xpj

These sources are free to use
Best Regard

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Xbase++ Workarea and ADO dataset

#8 Post by skiman »

Hi Hector,

Can you post your screenshot and sources for the Flexgrid?
Best regards,

Chris.
www.aboservice.be

patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Re: Xbase++ Workarea and ADO dataset

#9 Post by patito »

Hi
attach flexgrid.jpg and sources
1.- flexgrid.prg -> prueba .xpj
2.- other


Best Regard
Hector
Attachments
flexgrid.jpg
flexgrid.jpg (149.05 KiB) Viewed 15567 times
ado.rar
(126.92 KiB) Downloaded 725 times

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Xbase++ Workarea and ADO dataset

#10 Post by unixkd »

Thanks Roger,

Do let me know when you are thru with dbf sample for ADO recordset. That is exactly what I want.

Joe

Post Reply