|
-
Jul 14th, 2009, 06:15 AM
#1
Thread Starter
PowerPoster
[RESOLVED] insert into TSQL
how to insert special characters like ' or & or [] ... etc
with INSERT INTO statement.
with out replacing them
-
Jul 14th, 2009, 07:04 AM
#2
Re: insert into TSQL
Is this directly in SSMS or though a front end?
If front end the best option is to use parameterized queries. Second option is to use replace (if using concatinated SQL string) someVar.Replace"'","''")
If in SSMS then the single qoute (') needs to be two of them ('')
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jul 14th, 2009, 07:10 AM
#3
Re: insert into TSQL
Assuming it is through a front end... For an explanation of why you should be using parameters (and links to code examples), see the article Why should I use Parameters instead of putting values into my SQL string? from our Database Development FAQs/Tutorials (at the top of this forum).
-
Jul 14th, 2009, 09:27 AM
#4
Thread Starter
PowerPoster
Re: insert into TSQL
thank u sir
normally i work with MSaccess03
may i know what are the conflicting characters which i must
take care of please.
-
Jul 14th, 2009, 09:55 AM
#5
Re: insert into TSQL
Do you mean that you are working manually in Access itself? ..or that you are interacting with a database from a VB program?
If it is from a VB program (to any database system), read the article I linked to.
-
Jul 14th, 2009, 10:23 AM
#6
Thread Starter
PowerPoster
Re: insert into TSQL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|