Need a Strategy to store the Single Quotes in the Database

Tech-Archive recommends: Fix windows errors by optimizing your registry



I want to Store the String value with Single Quotes in the Field of
Database where if i try to Store the String value with Single Quotes
(as it is) then it is throwing the error as SQL String Truncated.

so we need a solution to store and retrieve user Entered value along
with single quotes into the Database.

i am using the String variable to frame the Qry(that is then passed
to Database for execution) which is as follows

StrSql="Insert into tblname values('" & txtfieldname.Text & "')"

for eg. if txtfieldName.text is "Mani's Test"

i want to store "Mani's Test" in the Field of Database
and on the same time i want to retrieve it as same

So let me know if u have any solutions / suggestions

thanks in advance
.



Relevant Pages

  • Re: Storing wave files in database
    ... analyse them and store everything in some sort of database. ... You don't store the Wave files in the database. ... ByVal lpOperation As String, _ ... Dim lRet As Long, varTaskID As Variant ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Storing a value for later use in vba or a Macro
    ... One thing I wonder about -- when I split my database and put the tables on ... Dim strCurrentCustomer as String ... do you programmatically store a value from one record to use in another ...
    (microsoft.public.access.gettingstarted)
  • Re: sql select statement not working
    ... The single quotes go around the value, concatenated into the string: ... >>> select that order form the database. ...
    (microsoft.public.outlook.program_forms)
  • Re: Storing a value for later use in vba or a Macro
    ... If you split you database, keeping the table locally would be ... Dim strCurrentCustomer as String ... do you programmatically store a value from one record to use in another ...
    (microsoft.public.access.gettingstarted)
  • Re: Replace blank record with "NULL"
    ... Dade/Time and Numeric fields can either have ... It makes no sense, whatsoever, to replace a database 'NULL' with the string "NULL" ... My recommendation is to store the database NULL rather than trying to store some magic value. ...
    (microsoft.public.vb.database)