Carriage Return in SQL Statement 
Author Message
 Carriage Return in SQL Statement

Carriage Return in SQL Statement

I gathering data from a .txt file by reading each line and
appending it to what has been gathered so far.  Looping
through something like this:

strReport = strReport & Chr$(10) & strNewData

The problem is after I insert the data into a table, what
I thought was a Carriage return now looks like a box and
after I export it back to a .txt file, the boxes don’t
function like a Carriage Return.  

Ive used both Chr$(10) and Chr$(13) and both get the same
results.  

Any ideas?
Thanks




Sat, 28 May 2005 00:19:01 GMT  
 Carriage Return in SQL Statement
Try adding both: vbCrLf
--
HTH
Tim Hansen

========================

Quote:
>-----Original Message-----
>Carriage Return in SQL Statement

>I gathering data from a .txt file by reading each line
and
>appending it to what has been gathered so far.  Looping
>through something like this:

>strReport = strReport & Chr$(10) & strNewData

>The problem is after I insert the data into a table, what
>I thought was a Carriage return now looks like a box and
>after I export it back to a .txt file, the boxes don't
>function like a Carriage Return.  

>Ive used both Chr$(10) and Chr$(13) and both get the same
>results.  

>Any ideas?
>Thanks


>.



Sat, 28 May 2005 03:21:16 GMT  
 Carriage Return in SQL Statement
Actually, if it was in an SQL statement, you would probably need to use Chr(13)
& Chr(10) for this to work.

  strReport = strReport & Chr(13) & Chr(10) & strNewData

Since your example seems to be a VBA statement, the vbCrLf will work nicely.

Quote:

> Try adding both: vbCrLf
> --
> HTH
> Tim Hansen

> ========================

> >-----Original Message-----
> >Carriage Return in SQL Statement

> >I gathering data from a .txt file by reading each line
> and
> >appending it to what has been gathered so far.  Looping
> >through something like this:

> >strReport = strReport & Chr$(10) & strNewData

> >The problem is after I insert the data into a table, what
> >I thought was a Carriage return now looks like a box and
> >after I export it back to a .txt file, the boxes don't
> >function like a Carriage Return.

> >Ive used both Chr$(10) and Chr$(13) and both get the same
> >results.

> >Any ideas?
> >Thanks


> >.



Sat, 28 May 2005 05:05:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Imbedded carriage return in SQL statement

2. carriage returns and word wrap with SQL results

3. Counting records returned by SQL Select statement

4. SQL Statement does not return records

5. SQL Statement returns records in Access but not in ADO

6. Put a carriage return in text

7. Carriage Returns In Text Boxes

8. carriage return in a report textbox

9. Deleting Last Carriage Return from Text File

10. coding a carriage return

11. Carriage Return

12. Carriage Return => Tab

 

 
Powered by phpBB® Forum Software