Re: Bind ADODB Recordset to SSDBGrid in vb6



On Apr 8, 10:08 am, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxxxxxxxxxxxxxxxx> wrote:
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
--

I tried doing this and it still shows the blank grid. Is is possible
that i am missing to tweak a setting for ssdbgrid control (except
DataMode property) to make this work?
.



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 ... to the grid control. ... Set dbgTMRequest.DataSource = rstTMRequests ...
    (microsoft.public.vb.database.ado)
  • Missing ((numeric)) values in recordset causing brain hemorrhaging -- please help!
    ... I am using VBA to import data from a web based service provider. ... In may cases there will be valid reasons to return missing values. ... I have tried the copyfromrecordset method of the recordset object. ...
    (microsoft.public.data.ado)
  • variables
    ... but I'm missing 'it'... ... Can I get the fields directly from the recordset ... without saving the data first? ... How do I get to access the values of variables set ...
    (microsoft.public.access.gettingstarted)
  • Re: Missing ((numeric)) values in recordset causing brain hemorrhaging -- please help!
    ... I think you should post code and specify where you get your error. ... > In may cases there will be valid reasons to return missing values. ... > I have tried the copyfromrecordset method of the recordset object. ...
    (microsoft.public.data.ado)

Loading