Those nasty characters... 
Author Message
 Those nasty characters...

When you INSERT a text field in a database using SQL instructions, you must
use the < ' > character.
E.g. "INSERT INTO books VALUES (" + str$(code as Integer) + ", ' " + name as
string + " ' );"
Problem is... how can I insert a string containing the < ' > character? It
must be easy, but I just couldn't find how.
Thanks.


Sun, 04 Feb 2001 03:00:00 GMT  
 Those nasty characters...
Hello,
        If you use: ... & Chr(39) & ... That will insert the ' character.  If
you use ... & Chr(34) & ... it will insert the " character.  To see more
of these, look up "Character Codes" in the VB help file.  Insert the
code in the parenthesis of the Chr() function.

Quote:

> When you INSERT a text field in a database using SQL instructions, you must
> use the < ' > character.
> E.g. "INSERT INTO books VALUES (" + str$(code as Integer) + ", ' " + name as
> string + " ' );"
> Problem is... how can I insert a string containing the < ' > character? It
> must be easy, but I just couldn't find how.
> Thanks.

--

Thomas Cameron

http://w3.to/thomasacc/
http://members.xoom.com/accweb/

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
                The only thing I want,
            is the one thing I can't have
                  - Thomas Cameron
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=



Sun, 04 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. nasty problem in VB with the " character

2. Nasty Multigenerational Query Parameter Help

3. Nasty little problem when accessing outlook from a standalone program

4. Office 2000 nasty crash

5. Nasty Little command bar

6. Big Nasty Bug Rearing Its Ugly Head...

7. Found a NASTY IDE crashing bug.

8. Nasty DBGRID again!!!

9. Nasty problem with VB and Sybase

10. Another nasty feature of MS product ?

11. Nasty Bug - Masked Edit Control

12. Nasty One - OUCH!!

 

 
Powered by phpBB® Forum Software