Datagrid Issues...

papa_k

Well-known member
Joined
Jun 12, 2003
Messages
77
Location
UK
I have a exe that i have created that collects stuff from a SQL server and puts it on the screen, VB database basically.

I have written it in VB6, and i converted it to VB.net

The code that worked fine on the 6 version now does not work on .net. I knew that this might be the case...

My problem...

I have a data grid on a form that i can directly reference in VB6, and i do, with the data being dumped from my record set rstUser to a form frmRefData with a data grid on it called dtgUser.

The working VB 6 code:

frmRefData.dtgUser.DataSource = rstUser



this is only one line taken, but the record set and all is working fine...the problem arrises thus...

The NON WORKING VB.net code:

(the comments were put there by the VB.net upgrade wizard)

UPGRADE_ISSUE: VBControlExtender property dtgUser.DataSource is not supported at runtime
frmRefData.dtgUser.DataSource = rstUser


and i get the error

"Reference to a non-shared memeber requires and object reference"

in the task list in .net

what do i do to get this working again? i am really stumped with this...leave a note if you need more information and i shall supply it (if i can)

Cheers,

Papa
 
frmRefData is the name of the class, not a handle to an instance of it. Forms are the same as other classes, you need an instance of them before you can mess with their properties.
 
Back
Top