Solved

ASCII/Keyboard

Posted on 2000-03-06
12
1,448 Views
Last Modified: 2012-06-21
Is there a combination of ascii characters/keyboard strokes to generate a page break/slew characters? This combination would be stored in an SQL table and placed in a file using bcp. Read by an application which is able to recognize a page break/slew characters.
0
Comment
Question by:TDENNIS
12 Comments
 
LVL 9

Expert Comment

by:david_levine
ID: 2589811
What's a page break and a slew? Are they just Ascii characters? What do you want to do with them?

If they are just ascii characters, you can refer to them directly like chr(13) or whatever the correct asci code is, in a stored procedure.

David
0
 
LVL 2

Expert Comment

by:jkotek
ID: 2590720
In Wintel enviromet you can hold <Alt> and type a character code ('1000' for 'R'...). Sometimes you have to use numeric keypad to type the character code and you can use good old ASCII code by suplying 0 in fromt of number ('082' for 'R', '065' for 'A'...)

In Unix there is allways possible to use '\' (backslash) to escape next character (<enter>, <tab>...)

Does this answer your question?
0
 

Expert Comment

by:csabay
ID: 2591290
I don't actually see what be your problem, TDENNIS. As David pointed out you can use char function to insert as many ascii characters as you like into every column of char-like type of your tables. Use the SQL command INSERT [INTO] or UPDATE to put certain values to columns.

Probably you don't know the ascii code? Page break used to be an ascii 12 almost always.

Remember to use -c option when bcp-ing because native form builds a file containing ascii 11 characters which can disturb your application working with the text.

Charles
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:TDENNIS
ID: 2591807
I found an ascii table with descriptions which listed ascii 12 as the (NP, Form Feed, new page) character. Thanks.
0
 

Author Comment

by:TDENNIS
ID: 2591812
I found an ascii table with descriptions which listed ascii 12 as the (NP Form Feed, new page) character. Thanks.
0
 

Accepted Solution

by:
csabay earned 45 total points
ID: 2592075
OK, TDENNIS, we all are glad. By the way: you can accept David's comment as an answer (as well as mine :-)...

Charles
0
 
LVL 1

Expert Comment

by:albertsp
ID: 2592551
Why put ascii code in your table just for the newline in your bcp file?

When bcp your data to a text file you can create and use a format file.
In this file it is possible to give the field terminator.

use "\n" for the last field wich is the same as ascii 12

Albert
0
 

Author Comment

by:TDENNIS
ID: 2592841
The page break/form feed is different from the new line charater. Currently, I am using a format file which contains the newline and carrige returns characters.  
0
 

Expert Comment

by:csabay
ID: 2636414
TDENNIS,

the question is quite old. Have you still got the problem? If it is solved please accept a comment as an answer. (David's comment was satisfying, I think.)

If it is not please explain us why not.

Regards

Charles
0
 

Expert Comment

by:csabay
ID: 2730002
TDENNIS,

are you here?

Charles
0
 

Expert Comment

by:russ_hensel
ID: 2847593
Seems like a bad idea to put formatting in data.  Generally you should use a cr lf pair of characters.  What the heck is a windows printer driver going to do with the characters.  How will the data be used in other contexts, that is other than the one output scheme that you are currently continplating.


Russ
0
 

Author Comment

by:TDENNIS
ID: 2847770
Comment accepted as answer
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
To form a query 10 399
SQL Query 2 334
StorageCraft ShadowProtect Sybase VSS? 3 586
MS SQL Linked server 3 129
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question