General information
Category:
Coding, syntax & commands
Hello Cetin,
Still no luck I fear.
I have absolutely nothing else in the form, just a subclassed HFlexGrid and Ado Data Control.
And now the code you gave in the INIT method.
_SCREEN.PRINT( IIF( TYPE("THISFORM.HFlexGrid1") = "O" AND !ISNULL(THISFORM.HFlexGrid1) , ;
"Flexgrid is here", "Flexgrid is missing" ) + CHR(13) )
_SCREEN.PRINT( IIF( TYPE("THISFORM.ADODc1") = "O" AND !ISNULL(THISFORM.ADODc1), ;
"ADODc is here", "ADODc is missing" )+CHR(13) )
THISFORM.HFlexGrid1.DATASOURCE = THISFORM.Adodc1.object
I then tried using a prg to get me the recordset from Fox2x tables.
#INCLUDE "..\PRGLIB\ADOCONST.H"
PUBLIC oCon, oRs
oCon = CREATEOBJECT( "ADODB.CONNECTION")
WITH oCon
.Provider = "MSDataShape"
.ConnectionString = "Data Provider=MSDASQL.1;Persist Security Info=False;Data Source=VFPDILIP"
.OPEN
ENDWITH
oRs = CREATEOBJECT( "ADODB.RECORDSET")
WITH oRs
.ActiveConnection = oCon
.SOURCE = 'SHAPE {SELECT * FROM INV_MAST WHERE INV_TYPE = "I"} AS INV_MAST ' ;
+ ' APPEND ( { SELECT INV_CODE, BRD_CODE, ITM_YEAR, ITM_CODE FROM ITM_MAST} RELATE "INV_CODE" TO "INV_CODE") AS ITEMS'
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.CursorLocation = adUseClient
.OPEN
?"RecordCount:",.RECORDCOUNT
ENDWITH
Then tried to connect this recordset to the ADO data on the form, like so from the Command window,
oAdo = _SCREEN.ACTIVEFORM.AdoDc1
oAdo.OBJECT.RecordSet = oRs -----> OLE Error 'member not found'
Any help would be 'preciated.
Dilip Pillai
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only