- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi all,
i have already posted similar question but i did not get any answer. I have spent whole week trying to find a solution, obviously, not successfuly :-)
I am trying to use ADO Data and DataGrid ActiveX controls and I have following problem:
when I insert controls (on a dialog), set all properties (among them, DataSource property of the DataGrid control reffers to ADO Data identifier) to and try to test a connection with database (through the underlying database provider) in Resources window i get what i want. But when i compile the project the ADO Data control is enabled and DataGrid control is not populated with data. I can get some basic properties (Title, etc) but if i want to set DataSource during run-time i get an error (the code of the error is unknown to Error Lookup tool).
i used following code
-to get idispatch interfaces:
lret=DlgGet(gdlg,DBDLG_ADODC,ado,DLG_IDISPATCH)
lret=DlgGet(gdlg,DBDLG_DATAGRID,dgrid,DLG_IDISPATCH)
-to get recordset
rs=IAdodc_GetRecordset(ado,ret)
-and then to set DataSource prperty
one of the first tries was using rs:
rs=IAdodc_GetRecordset(ado,ret) - this fails!!!
call IDataGrid_SetDataSource(dgrid,rs,ret)
one among others million tries was (using ADO 2.6 Type library - Connection, Recordset objects):
call $Connection_SetConnectionString(conn,'DSN=GOVNO',ret) !;-)
call $Connection_Open(conn,$STATUS=ret)
rs=$Connection_Execute(conn,"SELECT MyTable.* FROM MyTable;",$STATUS=ret)
ds=$Recordset_GetDataSource(rs,ret)
call IDataGrid_SetDataSource(dgrid,ds,ret) !fails again
Does anyone know what should be second parameter for
call IDataGrid_SetDataSource ?
Thanks
call IDataGrid_SetDataSource(dgrid,temp,ret)
Has anyoune used DataGrid co
i have already posted similar question but i did not get any answer. I have spent whole week trying to find a solution, obviously, not successfuly :-)
I am trying to use ADO Data and DataGrid ActiveX controls and I have following problem:
when I insert controls (on a dialog), set all properties (among them, DataSource property of the DataGrid control reffers to ADO Data identifier) to and try to test a connection with database (through the underlying database provider) in Resources window i get what i want. But when i compile the project the ADO Data control is enabled and DataGrid control is not populated with data. I can get some basic properties (Title, etc) but if i want to set DataSource during run-time i get an error (the code of the error is unknown to Error Lookup tool).
i used following code
-to get idispatch interfaces:
lret=DlgGet(gdlg,DBDLG_ADODC,ado,DLG_IDISPATCH)
lret=DlgGet(gdlg,DBDLG_DATAGRID,dgrid,DLG_IDISPATCH)
-to get recordset
rs=IAdodc_GetRecordset(ado,ret)
-and then to set DataSource prperty
one of the first tries was using rs:
rs=IAdodc_GetRecordset(ado,ret) - this fails!!!
call IDataGrid_SetDataSource(dgrid,rs,ret)
one among others million tries was (using ADO 2.6 Type library - Connection, Recordset objects):
call $Connection_SetConnectionString(conn,'DSN=GOVNO',ret) !;-)
call $Connection_Open(conn,$STATUS=ret)
rs=$Connection_Execute(conn,"SELECT MyTable.* FROM MyTable;",$STATUS=ret)
ds=$Recordset_GetDataSource(rs,ret)
call IDataGrid_SetDataSource(dgrid,ds,ret) !fails again
Does anyone know what should be second parameter for
call IDataGrid_SetDataSource ?
Thanks
call IDataGrid_SetDataSource(dgrid,temp,ret)
Has anyoune used DataGrid co
コピーされたリンク
4 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
sorry i made mistake:
what fails in first try is
call IDataGrid_SetDataSource(dgrid,rs,ret)
what fails in first try is
call IDataGrid_SetDataSource(dgrid,rs,ret)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Well, I tried some googling but nothing relevant came apart... if you don't consider the following quote relevant :-(
Hi Peter,
I have been following all the postings relating to grid. I was also trying to display records from a sql server table in a grid format. But I found this whole thing very difficult and finally gave up. Looks like no body has really used these grids or if someone knows, he/she doesn't want to tell anybody. This is really frustrating. I haven't seen much documentation/tutorial also on grids. I just wanted to share my thoughts with you.
Good Luck.
Sugriv
In any case, you're unlikely to find an answer here, since no one seems to have worked with IDataGrids. I'd suggest some microsoft.public. newsgroup (although judging on these Google results, you shouldn't be too enthusiastic about it either).
I know that it doesn't help...
Jugoslav
Hi Peter,
I have been following all the postings relating to grid. I was also trying to display records from a sql server table in a grid format. But I found this whole thing very difficult and finally gave up. Looks like no body has really used these grids or if someone knows, he/she doesn't want to tell anybody. This is really frustrating. I haven't seen much documentation/tutorial also on grids. I just wanted to share my thoughts with you.
Good Luck.
Sugriv
In any case, you're unlikely to find an answer here, since no one seems to have worked with IDataGrids. I'd suggest some microsoft.public. newsgroup (although judging on these Google results, you shouldn't be too enthusiastic about it either).
I know that it doesn't help...
Jugoslav
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
...btw, have you checked out this link found using Google?
Disclaimer: As you may have already concluded, it's Greek to me.
Disclaimer: As you may have already concluded, it's Greek to me.
