Steve-vfp9user
Programmer
Hello
In furtherance to this thread thread184-1724564, I am now able to create the required table.
One small issue I am having with a couple of the memo fields is that when the data is added to the table it is spaced like this (Slightly more as this thread doesn't show with proper spacing):
T H I S I S M Y S E N T E N C E
When I try to manually remove the spaces in a browse window as soon as you click on the text it disappears, albeit for the first character.
So this is what I've tried:
[ul]
[li]I created a secondary field in the table and tried to REPLACE it with the data from the field. That worked but as above, if I tried to remove the spaces, the data was hidden and only showed the first character.[/li]
[li]I also tried STRTRAN command but this had no effect[/li]
[li]As an extreme, I tried COPY TO myfile DELIMITED WITH "" WITH TAB and then imported back into a temporary table but the field data did not change.[/li]
[/ul]
Having researched this forum, I found some code that Mike Lewis had posted so I ran a test:
What I did with RECNO() 4 was completely remove the data from the field and add normal text just to prove the point that the first four records contained "unknown" or hidden characters and sure enough, that's what happened.
So having come this far, my question is, if I run the above code, how can I remove any unknown or hidden characters from the text string in the field(s) or is there something I can do perhaps at the time of doing this:
Thank you
Steve
In furtherance to this thread thread184-1724564, I am now able to create the required table.
One small issue I am having with a couple of the memo fields is that when the data is added to the table it is spaced like this (Slightly more as this thread doesn't show with proper spacing):
T H I S I S M Y S E N T E N C E
When I try to manually remove the spaces in a browse window as soon as you click on the text it disappears, albeit for the first character.
So this is what I've tried:
[ul]
[li]I created a secondary field in the table and tried to REPLACE it with the data from the field. That worked but as above, if I tried to remove the spaces, the data was hidden and only showed the first character.[/li]
[li]I also tried STRTRAN command but this had no effect[/li]
[li]As an extreme, I tried COPY TO myfile DELIMITED WITH "" WITH TAB and then imported back into a temporary table but the field data did not change.[/li]
[/ul]
Having researched this forum, I found some code that Mike Lewis had posted so I ran a test:
Code:
CLEAR
* TITLEL is the field in my table
lcLowchars = ""
FOR lnI=0 TO 31
lcLowchars = lcLowchars+CHR(lnI)
ENDFOR
lcLowchars = lcLowchars+CHR(127)
USE MYTABLE
SCAN
lcStripped = CHRTRAN (TITLEL, lcLowchars, "")
IF lcStripped <> TITLEL
WAIT "SPECIAL CHARS YES" WINDOW
ELSE
WAIT "SPECIAL CHARS NO" WINDOW
ENDIF
IF RECNO()=5
EXIT
ENDIF
ENDSCAN
What I did with RECNO() 4 was completely remove the data from the field and add normal text just to prove the point that the first four records contained "unknown" or hidden characters and sure enough, that's what happened.
So having come this far, my question is, if I run the above code, how can I remove any unknown or hidden characters from the text string in the field(s) or is there something I can do perhaps at the time of doing this:
Code:
lcConnstring = "Driver={SQL Server Native Client 10.0};Server=.\SQLEXPRESS;Database=OURDATA;Trusted_Connection=yes;"
m.lnConn = SQLStringConnect(lcConnstring)
SQLEXEC(m.lnConn, 'SELECT * FROM abc.ourdata','MYNEWTABLE')
SQLDISCONNECT(m.lnConn)
Thank you
Steve