Re: wanted: select query with has no result but with columns in re
- From: Jan <Jan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 06:45:28 -0700
Max,
Thanks for your post!
But in my test I executed a select query which has no results.
Of course there are no 'lines' in my recordset.
And also the fields collection stays empty...or was it filled and my test
was incorrect...?
Jan
"Max Kudrenko" wrote:
> Jan,
>
> Try examining the Fields collection:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdcolfields.asp
>
> Getting the field names can be achieved by something similar to this
> code:
>
> For Each fld In rst.Fields
> Debug.Print fld.Name
> Next
>
> Hope this helps,
>
> Max Kudrenko
> Brainbench MVP Program for Visual Basic
> www.brainbench.com
>
>
> Jan wrote:
> > Hi,
> > I am querying a sql server db with ado.
> > Sometimes I receive a record in the recordset and sometimes the recordset is
> > empty. This is correct and as expected.
> > But what I want is when I receive no records I still want to retrieve the
> > format (read columns) of the recordset ( the same as I would receive if there
> > was a record)...
> > So what I want is to receive a recordset with the columns defined but with
> > no row (or even better: an empty row)
> > Cheers,
> > Jan
>
>
.
- Follow-Ups:
- Re: wanted: select query with has no result but with columns in re
- From: Max Kudrenko
- Re: wanted: select query with has no result but with columns in re
- References:
- Prev by Date: Really disconnect a recordset?
- Next by Date: Re: Any suggestions with this updated code????
- Previous by thread: Re: wanted: select query with has no result but with columns in record
- Next by thread: Re: wanted: select query with has no result but with columns in re
- Index(es):
Relevant Pages
|