Click here to Skip to main content
16,005,734 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalcommand line Pin
Unplugged15-Jul-02 6:33
Unplugged15-Jul-02 6:33 
GeneralRe: command line Pin
sultan_of_6string15-Jul-02 7:28
sultan_of_6string15-Jul-02 7:28 
GeneralRe: command line Pin
Jeremy Falcon15-Jul-02 7:40
professionalJeremy Falcon15-Jul-02 7:40 
QuestionHow can i create timeline Pin
Mustafai15-Jul-02 0:25
Mustafai15-Jul-02 0:25 
GeneralTransfering Files/Folder over a network (LAN) Pin
Birdy14-Jul-02 19:57
Birdy14-Jul-02 19:57 
GeneralRe: Transfering Files/Folder over a network (LAN) Pin
devil66614-Jul-02 23:44
devil66614-Jul-02 23:44 
GeneralVB code problem - string Pin
Member 4167514-Jul-02 18:27
Member 4167514-Jul-02 18:27 
GeneralRe: VB code problem - string Pin
Ravi_Shankar14-Jul-02 21:27
Ravi_Shankar14-Jul-02 21:27 
Hi,

In the criteria, put it in a variable and use Replace function to replace the single quote found with 2 single quotes. Please find an example below to use the same with SQL Server.

Dim sSql As String
Dim sName As String

sName = "O'Leary"
sName = Replace(sName, "'", "''")

sSql = "Select * from authors where au_lname = '" & sName & "'"
Debug.Print sSql

Try executing the output of the above SQL statement in Query Analyser under Pubs database...


Ravi Shankar S
Programmer Analyst
iSOFT R&D Pvt Ltd
Chennai, INDIA
Ph: 91-44-4414980 Extn 1103
GeneralRe: VB code problem - string Pin
Ravi_Shankar14-Jul-02 21:31
Ravi_Shankar14-Jul-02 21:31 
GeneralRe: VB code problem - string Pin
James T. Johnson14-Jul-02 22:07
James T. Johnson14-Jul-02 22:07 
Generalgetting the user information Pin
devil66613-Jul-02 10:24
devil66613-Jul-02 10:24 
GeneralRe: getting the user information Pin
Ravi_Shankar14-Jul-02 19:31
Ravi_Shankar14-Jul-02 19:31 
GeneralRe: getting the user information Pin
devil66614-Jul-02 23:42
devil66614-Jul-02 23:42 
GeneralUsing MSHTML Advanced Hosting Interfaces Pin
Gene Sivorot13-Jul-02 9:00
Gene Sivorot13-Jul-02 9:00 
GeneralVB 6.0 and excel 2k interaction. Pin
patty13-Jul-02 2:03
patty13-Jul-02 2:03 
GeneralRe: VB 6.0 and excel 2k interaction. Pin
Toni Monte OLD13-Jul-02 2:58
Toni Monte OLD13-Jul-02 2:58 
GeneralRe: VB 6.0 and excel 2k interaction. Pin
patty13-Jul-02 4:01
patty13-Jul-02 4:01 
GeneralGetting the path of the current dll Pin
Anonymous Programmer11-Jul-02 5:25
sussAnonymous Programmer11-Jul-02 5:25 
GeneralRe: Getting the path of the current dll Pin
Kastro22-Jul-02 19:09
Kastro22-Jul-02 19:09 
Generalstring access Pin
Unplugged11-Jul-02 4:48
Unplugged11-Jul-02 4:48 
GeneralRe: string access Pin
Roger Wright11-Jul-02 5:00
professionalRoger Wright11-Jul-02 5:00 
Generaldrag drop Pin
Hesham Amin11-Jul-02 4:34
Hesham Amin11-Jul-02 4:34 
GeneralIntellisense Pin
Balachandar Ganesan10-Jul-02 13:22
Balachandar Ganesan10-Jul-02 13:22 
GeneralRe: Intellisense Pin
Jeremy Falcon11-Jul-02 4:45
professionalJeremy Falcon11-Jul-02 4:45 
GeneralRunning Code in a Different Page. Pin
Pradhip10-Jul-02 12:39
Pradhip10-Jul-02 12:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.