cant get memo

cant get memo

Post by Haim Kat » Wed, 30 Aug 2000 04:00:00



I am connecting to a 4D database via ODBC in a vb6 application  I have a
problem querying the memo fields from the database (in
4d their called text fields, but are the same type as an access memo field).
If I query using ado, all the memo fields are returned as null.  I can query
the memo fields using dao , but I can bind any controls to the recordset.
Does anyone have any suggestion as to how to correct the problem using ado
or dao?

Haim Katz

 
 
 

cant get memo

Post by Doug Durret » Wed, 30 Aug 2000 04:00:00


I've had a simular problem with "text" fields coming from Foxpro tables in
ADO.

The only way I could get around it was to DIM a variable to store the 'text'
field in.  When your recordset is open, set the 'text' fields to variable
BEFORE any other fields are accessed in your recordset.  I am speaking from
code recordsets and not bound.  If you are binding then I'm not sure how to
get around this but maybe this can point you in the right direction

--
Doug Durrett
Microsoft Certified Professional
Analytix, Inc.
9461 Dielman Rock Island
St. Louis, MO 63132
(888) 991-8649

Quote:> I am connecting to a 4D database via ODBC in a vb6 application  I have a
> problem querying the memo fields from the database (in
> 4d their called text fields, but are the same type as an access memo
field).
> If I query using ado, all the memo fields are returned as null.  I can
query
> the memo fields using dao , but I can bind any controls to the recordset.
> Does anyone have any suggestion as to how to correct the problem using ado
> or dao?

> Haim Katz


 
 
 

cant get memo

Post by Haim Kat » Thu, 31 Aug 2000 04:00:00


Thanks Doug for the response.

I don't completely follow your suggestion.

are you saying something like the following.

dim myconn as new ado.connection, mytextfield() as string, myrs as new
ado.recordset

myconn.open = "connection string to odbc database"
myrs.open("select memofield, nonmemofield from odbctable",myconn)
for i ....
mytextfield(i)=myrs("memofield")
end for

The above code doesn't work, the myrs("memofield") is still null.
You did give me an idea of querying in dao and put the resulting recordset
in variables and playing with them.  I would like to avoid all this code
(thats why I use vb and this ado stuff which is supposed to save me from
writing code).

I also discovered that in using dao, if I query with an odbc direct
workspace I have no problems, but if I query with a jet workspace, than I
have the same problem as if I query with ado.  I've been searching the
literature for an ado equivalent of an odbc workspace but can't find it.
Does it exist?

Thanks
Haim


> I've had a simular problem with "text" fields coming from Foxpro tables in
> ADO.

> The only way I could get around it was to DIM a variable to store the
'text'
> field in.  When your recordset is open, set the 'text' fields to variable
> BEFORE any other fields are accessed in your recordset.  I am speaking
from
> code recordsets and not bound.  If you are binding then I'm not sure how
to
> get around this but maybe this can point you in the right direction

> --
> Doug Durrett
> Microsoft Certified Professional
> Analytix, Inc.
> 9461 Dielman Rock Island
> St. Louis, MO 63132
> (888) 991-8649


> > I am connecting to a 4D database via ODBC in a vb6 application  I have a
> > problem querying the memo fields from the database (in
> > 4d their called text fields, but are the same type as an access memo
> field).
> > If I query using ado, all the memo fields are returned as null.  I can
> query
> > the memo fields using dao , but I can bind any controls to the
recordset.
> > Does anyone have any suggestion as to how to correct the problem using
ado
> > or dao?

> > Haim Katz

 
 
 

cant get memo

Post by Haim Kat » Thu, 31 Aug 2000 04:00:00


Thanks Doug for the response.

I don't completely follow your suggestion.

are you saying something like the following.

dim myconn as new ado.connection, mytextfield() as string, myrs as new
ado.recordset

myconn.open = "connection string to odbc database"
myrs.open("select memofield, nonmemofield from odbctable",myconn)
for i ....
mytextfield(i)=myrs("memofield")
end for

The above code doesn't work, the myrs("memofield") is still null.
You did give me an idea of querying in dao and put the resulting recordset
in variables and playing with them.  I would like to avoid all this code
(thats why I use vb and this ado stuff which is supposed to save me from
writing code).

I also discovered that in using dao, if I query with an odbc direct
workspace I have no problems, but if I query with a jet workspace, than I
have the same problem as if I query with ado.  I've been searching the
literature for an ado equivalent of an odbc workspace but can't find it.
Does it exist?

Thanks
Haim


> I've had a simular problem with "text" fields coming from Foxpro tables in
> ADO.

> The only way I could get around it was to DIM a variable to store the
'text'
> field in.  When your recordset is open, set the 'text' fields to variable
> BEFORE any other fields are accessed in your recordset.  I am speaking
from
> code recordsets and not bound.  If you are binding then I'm not sure how
to
> get around this but maybe this can point you in the right direction

> --
> Doug Durrett
> Microsoft Certified Professional
> Analytix, Inc.
> 9461 Dielman Rock Island
> St. Louis, MO 63132
> (888) 991-8649


> > I am connecting to a 4D database via ODBC in a vb6 application  I have a
> > problem querying the memo fields from the database (in
> > 4d their called text fields, but are the same type as an access memo
> field).
> > If I query using ado, all the memo fields are returned as null.  I can
> query
> > the memo fields using dao , but I can bind any controls to the
recordset.
> > Does anyone have any suggestion as to how to correct the problem using
ado
> > or dao?

> > Haim Katz

 
 
 

cant get memo

Post by Haim Kat » Thu, 31 Aug 2000 04:00:00


Thanks Doug for the response.

I don't completely follow your suggestion.

are you saying something like the following.

dim myconn as new ado.connection, mytextfield() as string, myrs as new
ado.recordset

myconn.open = "connection string to odbc database"
myrs.open("select memofield, nonmemofield from odbctable",myconn)
for i ....
mytextfield(i)=myrs("memofield")
end for

The above code doesn't work, the myrs("memofield") is still null.
You did give me an idea of querying in dao and put the resulting recordset
in variables and playing with them.  I would like to avoid all this code
(thats why I use vb and this ado stuff which is supposed to save me from
writing code).

I also discovered that in using dao, if I query with an odbc direct
workspace I have no problems, but if I query with a jet workspace, than I
have the same problem as if I query with ado.  I've been searching the
literature for an ado equivalent of an odbc workspace but can't find it.
Does it exist?

Thanks
Haim


> I've had a simular problem with "text" fields coming from Foxpro tables in
> ADO.

> The only way I could get around it was to DIM a variable to store the
'text'
> field in.  When your recordset is open, set the 'text' fields to variable
> BEFORE any other fields are accessed in your recordset.  I am speaking
from
> code recordsets and not bound.  If you are binding then I'm not sure how
to
> get around this but maybe this can point you in the right direction

> --
> Doug Durrett
> Microsoft Certified Professional
> Analytix, Inc.
> 9461 Dielman Rock Island
> St. Louis, MO 63132
> (888) 991-8649


> > I am connecting to a 4D database via ODBC in a vb6 application  I have a
> > problem querying the memo fields from the database (in
> > 4d their called text fields, but are the same type as an access memo
> field).
> > If I query using ado, all the memo fields are returned as null.  I can
> query
> > the memo fields using dao , but I can bind any controls to the
recordset.
> > Does anyone have any suggestion as to how to correct the problem using
ado
> > or dao?

> > Haim Katz

 
 
 

cant get memo

Post by Jekke Bla » Thu, 31 Aug 2000 04:00:00


On Tue, 29 Aug 2000 12:17:11 +0200, "Haim Katz"


>I am connecting to a 4D database via ODBC in a vb6 application  I have a
>problem querying the memo fields from the database (in
>4d their called text fields, but are the same type as an access memo field).
>If I query using ado, all the memo fields are returned as null.  

Instead of .Fields("fieldname").Value, use
.Fields("fieldname").GetChunk

Quote:>I can query
>the memo fields using dao , but I can bind any controls to the recordset.
>Does anyone have any suggestion as to how to correct the problem using ado
>or dao?

Don't use bound controls. They are evil and will take the first
opportunity they are given to move into your house, grope your
daughter, kick your dog, and smoke the ganga you hid  in the Franklin
Mint porcelain next to the TV.

--Jekke
  --
  Experienced ASP/COM developers interested in
  sharing (possibly owning) a dedicated server:
  http://www.egroups.com/group/servershare-interest

 
 
 

cant get memo

Post by Haim Kat » Fri, 01 Sep 2000 04:00:00


Quote:> >I am connecting to a 4D database via ODBC in a vb6 application  I have a
> >problem querying the memo fields from the database (in
> >4d their called text fields, but are the same type as an access memo
field).
> >If I query using ado, all the memo fields are returned as null.

> Instead of .Fields("fieldname").Value, use
> Fields("fieldname").GetChunk

I still get null for value.

I can query the fields using an odbc workspace in dao.  If I use a jet
workspace in dao I have the same problem.  More importantly who do I curse?
Microsoft
4D
Both
My mother in law?

Quote:> >I can query
> >the memo fields using dao , but I can bind any controls to the recordset.
> >Does anyone have any suggestion as to how to correct the problem using
ado
> >or dao?

> Don't use bound controls. They are evil and will take the first
> opportunity they are given to move into your house, grope your
> daughter, kick your dog, and smoke the ganga you hid  in the Franklin
> Mint porcelain next to the TV.

Except for the part about my daughter, the rest I can live with (I don't
have a dog).

Haim

Quote:> --Jekke
>   --
>   Experienced ASP/COM developers interested in
>   sharing (possibly owning) a dedicated server:
>   http://www.egroups.com/group/servershare-interest

 
 
 

1. Cant read memo fields in ADO

I am connecting to a 4D database via ODBC driver from an access 2000
database.  I have a problem querying the memo fields from the database (in
4d their called text fields, but are the same type as an access memo field).
If I query using ado, all the memo fields are returned as null.  If i query
using dao, than I have no problems.  Does anyone have any suggestion as to
how to correct the problem using ado?

Haim Katz

2. SQL SERVER DBA's WANTED - NYC

3. Cant Browse Cube cant connect to database

4. Please help me with a DB connection.

5. value of memo field gets truncated

6. An aside...how to write on Usenet so you'll actually get *read*

7. Problem getting Memo field to show contents...

8. Pick database integration

9. Getting Image Data into a Memo Field

10. ADO recordset's memo field gets truncated at 254 characters

11. Getting Rid of BLOBS & Memos - Thanks

12. Getting a Memo field in a table into a TMemo component

13. Getting Rid of Blobs & Memos