ADOBD Connection PartDescription is blank

Try

Select substring(PartDescription,1,255) as partDescription from ...
On Jun 11, 2011 6:10 PM, "randyweb" <weber.randy@...> wrote:


[Non-text portions of this message have been removed]
Epicor 9.05.604a

I am using Excel VBA ADODB connection to SQL server to get part data. The description field comes up blank. Here is my query:
.Open "SELECT Company, PartNum, PartDescription, ClassId,IUM FROM Part"
Sheets("Sheet3").Range("A1").CopyFromRecordset rsPubs

Is does not return any errors, but the third column where the PartDescription should be is blank.

Any ideas?

Randy Weber
Rayotek Scientific
What happens if you loop through the descriptions instead of using the
CopyFromRecordset method?

While not rsPubs.eof
debug.print rsPubs("PartDescription")
Wend

Mark W.

On Sat, Jun 11, 2011 at 3:16 PM, randyweb <weber.randy@...> wrote:

>
>
> Epicor 9.05.604a
>
> I am using Excel VBA ADODB connection to SQL server to get part data. The
> description field comes up blank. Here is my query:
> .Open "SELECT Company, PartNum, PartDescription, ClassId,IUM FROM Part"
> Sheets("Sheet3").Range("A1").CopyFromRecordset rsPubs
>
> Is does not return any errors, but the third column where the
> PartDescription should be is blank.
>
> Any ideas?
>
> Randy Weber
> Rayotek Scientific
>
>
>


[Non-text portions of this message have been removed]
Mark,

The same thing happens. I think it is because the field type is adoVarLongChar and holds up to 1,000 characters, though we don't have any longer than about 200.

It's driving me crazy. I was able to display the PartDescription with ODBC and MS Query, but I cannot get it using code, which I need for this project.

Thanks for trying.

Randy


--- In vantage@yahoogroups.com, Mark Wonsil <mark_wonsil@...> wrote:
>
> What happens if you loop through the descriptions instead of using the
> CopyFromRecordset method?
>
> While not rsPubs.eof
> debug.print rsPubs("PartDescription")
> Wend
>
> Mark W.
>
> On Sat, Jun 11, 2011 at 3:16 PM, randyweb <weber.randy@...> wrote:
>
> >
> >
> > Epicor 9.05.604a
> >
> > I am using Excel VBA ADODB connection to SQL server to get part data. The
> > description field comes up blank. Here is my query:
> > .Open "SELECT Company, PartNum, PartDescription, ClassId,IUM FROM Part"
> > Sheets("Sheet3").Range("A1").CopyFromRecordset rsPubs
> >
> > Is does not return any errors, but the third column where the
> > PartDescription should be is blank.
> >
> > Any ideas?
> >
> > Randy Weber
> > Rayotek Scientific
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>