Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 To: Julio Laborin
  Where is Julio Laborin?
 Ciudad Juarez
 Mexico
 Julio Laborin
 Tags
Subject: RE: Problem with SELECT and MEMO field
Thread ID: 189197 Message ID: 189205 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, August 13, 2008 8:24:06 PM         
   


> In order to get the default values on my CA, I need to define them in the CursorSchema property . Something like this :
>
>
CursorSchema =  "CODIGO I,DESCRIP C(50) DEFAULT('Description Here')"

>
> To accomplish this, I made a SELECT :
>
>
>
Sql_Query="SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=MyTable"
> result=SQLEXEC(m.Sql_lnHandle, Sql_Query, 'MySchema')

>
>
> If I BROWSE the table, MySchema.column_default is a MEMO field, but here is the 1st problem, the information looks different from what I see in the SQL Management Studio, here is padded with spaces, example :
>
>
> In SQL :
>
> ("'Description Here'")
>
>
> In my CA :
>
> ( " ' D e s c r i p t i o n h e r e ' " )
>
>
> The 2nd problem is If I try to read the information of the MEMO field, I only get 1 character :-O
>
>
>
MESSAGEBOX(MySchema.column_default )      && Shows (   

>
>
> I checked the type and length of the field, it seems correct, but I cant get the info correctly , I have tried with :
>
>
>
> 	SUBSTR
>       	MLINE
>       	ATC 

>
> Same result, I am getting just 1 character .

hi julio,
i think that text is in unicode and u have to convert it to double-byte characters.


	lReadableText = STRCONV( MySchema.column_default ,6)

        =messagebox(lReadableText,0+64,"info")

 



Anil
(Fox is the solution for almost everything!!)

ENTIRE THREAD

Problem with SELECT and MEMO field Posted by Julio Laborin @ 8/13/2008 7:40:33 PM
RE: Problem with SELECT and MEMO field Posted by Anders Altberg @ 8/13/2008 8:05:07 PM
RE: Problem with SELECT and MEMO field Posted by Yuri Rubinov @ 8/13/2008 8:21:07 PM
RE: Problem with SELECT and MEMO field Posted by Anil Sharma @ 8/13/2008 8:24:06 PM
RE: Problem with SELECT and MEMO field Posted by Julio Laborin @ 8/13/2008 8:35:55 PM