Hi,
I have installed Visual Studio 2005 and am working on Visual
Basic. I have created a ADODB connection to a DB2 database in a server
whose IP address, Portnumber, hostname... are known to me. I have
created a recordset also and assigned a query to it.
Dim Adcon as ADODB.Connection
Dim Adors as ADODB.Recordset
Adcon = New ADODB.Connection
Adors = New ADODB.Recordset
adcon.open (<Connection String>)
Adors.CursorLocation = CursorLocationEnum.adUseClient
Adors.Open(<Query>, Adcon, CursorTypeEnum.adOpenDynamic,
LockTypeEnum.adLockOptimistic)
DataGridView1.DataSource = Adors
I am using the above mentioned steps. Before Assigning the Recordset
to Data grid view, I have checked if the recordset has values and
found that recordset retreived correct set of records using watch. But
the datagridview remains empty even after using the statement
"DataGridView1.DataSource = Adors". I am not sure why this happens.
Please let me know if there is a solution.
Note: The same piece of code works well in VB 6.0 for a Datagrid
control. Also, when I use project upgrading from VB6.0 to VB 2005, the
same datagrid control is working.
Ralph - 17 Sep 2007 13:56 GMT
> Hi,
>
> I have installed Visual Studio 2005 and am working on Visual
> Basic. > <snipped>
>
> Please let me know if there is a solution.
yes, but you need to seek it in a dotNet newsgroup...
You can find a complete list of managed (dotNet) newsgroups here:
http://msdn.microsoft.com/subscriptions/managednewsgroups/list.aspx
Franck - 18 Sep 2007 15:09 GMT
datagrid.refresh :P
Ralph - 18 Sep 2007 17:39 GMT
> datagrid.refresh :P
Shhhhh!
(Most people know the answer, but it's like feeding a lost dog. You do him
no favors. Best to point the way home.)