Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 5th, 2004, 02:21 PM
SigmaX SigmaX is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 17 SigmaX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
INSERT question

Hey I'm really new to all this.

I'm trying to do an INSERT statement

It works but the text boxes can contain any value
so if someone types in ' or " it messes things up.

I'm sure this is a simple solution but I haven't been able to find anything anywhere

Please help!

Thanks

-X-

Reply With Quote
  #2  
Old February 5th, 2004, 03:20 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
Assign your textboxes input masks. This will make it so that if a field and only hold numeric values, the user can only enter numeric values. If they are to be adding Dates, they can only enter dates.

S-

Reply With Quote
  #3  
Old February 5th, 2004, 03:35 PM
SigmaX SigmaX is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 17 SigmaX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Looking to use text input

Quote:
Originally Posted by sbaxter
Assign your textboxes input masks. This will make it so that if a field and only hold numeric values, the user can only enter numeric values. If they are to be adding Dates, they can only enter dates.

S-



That would be good but I want users to be able to enter ' & " in their text messages

Reply With Quote
  #4  
Old February 5th, 2004, 04:41 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
those symbols are reserved in SQL code and will cause you nothing but problems. You can't use them and use insert statements. There are ways to bypass that (ADO recordsets), but I still wouldn't recommend allowing those symbols if at all possible, espically in field that you will be searching against.

S-

Reply With Quote
  #5  
Old February 5th, 2004, 04:53 PM
SigmaX SigmaX is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 17 SigmaX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by sbaxter
those symbols are reserved in SQL code and will cause you nothing but problems. You can't use them and use insert statements. There are ways to bypass that (ADO recordsets), but I still wouldn't recommend allowing those symbols if at all possible, espically in field that you will be searching against.

S-



Actually I finnaly found the answer

to insert a ' in an INSERT statment it needs to be put in as ''
i.e. INSERT INTO Table (text) VALUES ('Hello I''m Here')

" I didn't actually have a problem with. It does fine inside single quotes.

-X-

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > INSERT question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway