Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question Plz Help me

Status
Not open for further replies.

Ologhai

Programmer
Apr 11, 2000
42
CA
this is my select<br>"SELECT * FROM manuf WHERE descrip='" & recMerisel!VEND_NM & "'"<br>recMerisel!VEND_NM = "O'KEENE LDT."<br><br>there is a ' in the string and darn the select !!<br><br>there is a methode to do something ?<br><br>plz anwser me at <A HREF="mailto:hugues_gauthier@hotmail.com">hugues_gauthier@hotmail.com</A><br>thx a lot
 
Are running this line from a front-end in something like VB on top of SS7.0 ?<br>a line like<br><FONT FACE=monospace>select * from Courses where Delegate_name = &quot;John O'Keefe&quot;</font><br>works fine in SS7.0 so it may be a VB problem in creating the string.....
 
Yes,<br><br>There is a ' in the string ie &quot;O'KEENE LDT.&quot;<br>When sending the string to SQL Server, the string will look like this:<br><br>SELECT * FROM manuf WHERE descrip='XXXX' and VEND_NM<br>= 'O'KEENE LDT.'<br><br>Thus the quote will be thought of as a terminating string with some extra bit on the end. You will need to parse the string and add a quote mark if there is one embedded in the string.<br>ie.<br>SELECT * FROM manuf WHERE descrip='XXXX' and VEND_NM<br>= 'O''KEENE LDT.'<br><br>Hope this helps<br><br>CD<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top