Re: Bind ADODB Recordset to SSDBGrid in vb6



Hetal wrote:

How can i bind ADODB Recordset to SSDBGrid control in VB6?

Currently i have SSDBGrid Control named dbgTMRequest on my form with
DataMode set to "0-Bound". The recordset that i am binding it to is
rstTMRequests. Here is the code that i am using to bind my recordset
to the grid control.

======================
strSQL = "Select * from...."
rstTMRequests.Open strSQL, cntDBPOS, adOpenStatic, adLockReadOnly
dbgTMRequest.DataSource = rstTMRequests.DataSource
dbgTMRequest.Rebind
dbgTMRequest.Refresh
======================

When i do this my grid shows up as blank even when there are records
in the recordset. Am i missing to do something here?

I would try:

Set dbgTMRequest.DataSource = rstTMRequests

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--


.



Relevant Pages

  • Re: Bind ADODB Recordset to SSDBGrid in vb6
    ... DataMode set to "0-Bound". ... Here is the code that i am using to bind my recordset ... Set dbgTMRequest.DataSource = rstTMRequests ... that i am missing to tweak a setting for ssdbgrid control (except ...
    (microsoft.public.vb.database.ado)
  • Re: Bind ADODB Recordset to SSDBGrid in vb6
    ... DataMode set to "0-Bound". ... Here is the code that i am using to bind my recordset ... Am i missing to do something here? ... Set dbgTMRequest.DataSource = rstTMRequests ...
    (microsoft.public.vb.database.ado)
  • Grids on form with Private Datasession and 3 tier application
    ... like to display a recordset in a grid on my form. ... am on the verge of just coding the data access straight into my grid control ... Is my best option ADO or another idea? ... will accept ADO as a recordset or do I have to convert it back to a cursor? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: "Runtime Error:3273 Method not Applicable for This object"
    ... changes.So,whenever I launch form,I am storing original data into one ... There isn't much you can do besides creating a new recordset with the same structure plus the new fields and then copy all the data to the new one. ... You might be able to use a grid control which you just keep hidden all the time instead of a recordset. ... If the data is to be visible to the user then a grid would work and you can associate the RowData array with the AbsolutePosition of the recordset. ...
    (microsoft.public.vb.general.discussion)
  • Bind ADODB Recordset to SSDBGrid in vb6
    ... How can i bind ADODB Recordset to SSDBGrid control in VB6? ... to the grid control. ...
    (microsoft.public.vb.database.ado)

Loading