Re: Bind ADODB Recordset to SSDBGrid in vb6
- From: "Dmitriy Antonov" <antonovdima@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 8 Apr 2008 14:27:41 -0400
"Hetal" <hetal.a.kapadia@xxxxxxxxx> wrote in message
news:32d18b36-cddf-4611-8b6c-e71047ebc535@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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?
I remember I had something similar with another grid (or was it the one you
are asking about?). That time the problem was that the control worked
properly with ClientSide cursor only. Try to set cursor side to the Client
explicitly before rst opening.
Dmitriy.
.
- References:
- Bind ADODB Recordset to SSDBGrid in vb6
- From: Hetal
- Re: Bind ADODB Recordset to SSDBGrid in vb6
- From: Richard Mueller [MVP]
- Re: Bind ADODB Recordset to SSDBGrid in vb6
- From: Hetal
- Bind ADODB Recordset to SSDBGrid in vb6
- Prev by Date: Re: Bind ADODB Recordset to SSDBGrid in vb6
- Next by Date: UPDATE statement help / MS Access db
- Previous by thread: Re: Bind ADODB Recordset to SSDBGrid in vb6
- Next by thread: UPDATE statement help / MS Access db
- Index(es):
Relevant Pages
|
Loading