 |

07-15-2003, 11:15 PM
|
|
Newcomer
|
|
Join Date: Jul 2003
Posts: 7
|
|
How to provide datasource for DBGrid without datacontrol?
|
I am using DBgrid in my program. I can easily connect DBGrid to database using datacontrols. But i am having problem with datacontrol if I use it in some other system where VB is not installed.
Please provide Help for using DBGrid without datacontrol as datasource.
|
|

07-15-2003, 11:46 PM
|
 |
Senior Contributor
|
|
Join Date: Aug 2002
Location: In loved one's heart
Posts: 929
|
|
Hi,
try this
Code:
dim Recordset1 as adodb.recordset
'recordset1.open.....
set DataGrid1.Datasource = Recordset1
|
__________________
Regards,
Sidhu
When you do not get the expected result, change your programming language.
|

07-16-2003, 02:24 AM
|
|
Newcomer
|
|
Join Date: Jul 2003
Posts: 7
|
|
Quote: Originally Posted by gundavarapu Hi,
try this
Code:
dim Recordset1 as adodb.recordset
'recordset1.open.....
set DataGrid1.Datasource = Recordset1
Sorry, This code is not working
it is showing 'Class does not support Automation'.
Please gimme some other solution.
Thank you.
|
|

07-16-2003, 03:08 AM
|
 |
Senior Contributor
|
|
Join Date: Aug 2002
Location: In loved one's heart
Posts: 929
|
|
|
Hi,
I have used this so many times. It should work.
check these first.
1. Have you created a connection to the database using the ADODB.Connection Object.
2. Have you created a rowset to the table using the ADODB.Recordset object.
3. Did you place a datagrid control with the name Datagrid1.
if you have these three then it should work. You double check these things and post once again.
regards,
Sidhu
|
__________________
Regards,
Sidhu
When you do not get the expected result, change your programming language.
|

07-16-2003, 10:38 PM
|
|
Newcomer
|
|
Join Date: Jul 2003
Posts: 7
|
|
|
I did everything as u mentioned above. Even then it is not working. Please help in correcting this. Any .DLL problem?
|
|

07-16-2003, 11:38 PM
|
 |
Senior Contributor
|
|
Join Date: Aug 2002
Location: In loved one's heart
Posts: 929
|
|
|
Hi, May be inconsistency in the Control.
Is it that necessary for you to use a DataGrid Control? If not, then why don't you try with several grids which come up with the VB Software.
But, I still wonder why that is not working for you?
I've using this for years.
May be you could post the code, for someone to look into the problem.
Regards,
Sidhu
|
__________________
Regards,
Sidhu
When you do not get the expected result, change your programming language.
|

07-17-2003, 04:14 AM
|
|
Newcomer
|
|
Join Date: Jul 2003
Posts: 7
|
|
Quote: Originally Posted by gundavarapu Hi, May be inconsistency in the Control.
Is it that necessary for you to use a DataGrid Control? If not, then why don't you try with several grids which come up with the VB Software.
But, I still wonder why that is not working for you?
I've using this for years.
May be you could post the code, for someone to look into the problem.
Regards,
Sidhu
Tell me which Grid can directly take datasource from recordset? or is there anyway to use MSRDC as datasource?
Sorry, I'm troubling u very much....
Thank u
|
|

07-17-2003, 04:35 AM
|
 |
Senior Contributor
|
|
Join Date: Aug 2002
Location: In loved one's heart
Posts: 929
|
|
troubles are the way to success
Logically speaking, any grid should connect to the recordset, otherwise there is no fun in using grids. You can use any of the native grids provided with VB.
like
DataGrid - Data Grid
MSFlexGrid - MS Flex Grid
MSHFlexGrid- MS Hierarchial Flex Grid
...
Coming to MSRDC, i've not used RDC till now as i feel comfortable ADODC, infact i've been using ADODB only, I hate data controls.
One point for you to note, ADODC is the latest control from the microsoft desk. It even provides connectivity to SQL Server, for that matter to any of the database which has either a ODBC or Ole Db providers.
It can also be used to connect remote data sources.
I'm telling all this because, if possible, i want you to try and use ADODC instead of MSRDC.
Even Microsoft recommends ADO technology for new projects.
Even ADO is out dated, now ADO.Net is the latest technology.
So i suggest you to get along with the latest technology and leave the old DAO to hell.
Though, this does not solve the problem, it surely provides a wide range of things for you to try.
Regards,
Sidhu
|
__________________
Regards,
Sidhu
When you do not get the expected result, change your programming language.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|