Click here to Skip to main content
15,925,444 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Returning primary key value when inserting records Pin
Guffa27-Jan-06 7:19
Guffa27-Jan-06 7:19 
GeneralRe: Returning primary key value when inserting records Pin
dptalt30-Jan-06 10:27
dptalt30-Jan-06 10:27 
AnswerRe: Returning primary key value when inserting records Pin
Guffa30-Jan-06 20:53
Guffa30-Jan-06 20:53 
Questionmessage alert system sending to cell phone.. Pin
JustmeNick24-Jan-06 5:12
JustmeNick24-Jan-06 5:12 
AnswerRe: message alert system sending to cell phone.. Pin
Matthew Hazlett24-Jan-06 21:42
Matthew Hazlett24-Jan-06 21:42 
AnswerRe: message alert system sending to cell phone.. Pin
Member 374890325-Nov-09 23:13
Member 374890325-Nov-09 23:13 
Questioninsert string with apostrophes Pin
Marc Soleda24-Jan-06 4:09
Marc Soleda24-Jan-06 4:09 
AnswerRe: insert string with apostrophes Pin
Dave Kreskowiak24-Jan-06 5:35
mveDave Kreskowiak24-Jan-06 5:35 
Let me gues, you''re concatenting SQL statements together like this:
Dim sql As String
sql = "INSERT INTO table field1, field2, field3 VALUES ('" & textbox.text & "', '" & textbox2.text & "' " & textbox3.text & "')"

This is completely the wrong way to do it and you'll run into escaping problems, like you've discovered, and you also open yourself up to SQL Injection attacks.

Use parameterized queries and you won't have this problem at all.
See this[^] article by Collin Angus Mackay for more information.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: insert string with apostrophes Pin
Marc Soleda24-Jan-06 20:54
Marc Soleda24-Jan-06 20:54 
GeneralRe: insert string with apostrophes Pin
Dave Kreskowiak25-Jan-06 1:47
mveDave Kreskowiak25-Jan-06 1:47 
AnswerRe: insert string with apostrophes Pin
Joshua Quick24-Jan-06 7:01
Joshua Quick24-Jan-06 7:01 
GeneralRe: insert string with apostrophes Pin
Marc Soleda24-Jan-06 7:04
Marc Soleda24-Jan-06 7:04 
GeneralRe: insert string with apostrophes Pin
Joshua Quick24-Jan-06 7:17
Joshua Quick24-Jan-06 7:17 
AnswerRe: insert string with apostrophes Pin
Christian Graus24-Jan-06 15:31
protectorChristian Graus24-Jan-06 15:31 
GeneralRe: insert string with apostrophes Pin
Marc Soleda24-Jan-06 20:58
Marc Soleda24-Jan-06 20:58 
QuestionRE:how to sort dataset without using dataview at Run time(code required) Pin
FRAZ SOOMRO24-Jan-06 1:45
FRAZ SOOMRO24-Jan-06 1:45 
Questionabout Parallel Port Programming??? Pin
flashmemory24-Jan-06 1:14
flashmemory24-Jan-06 1:14 
AnswerRe: about Parallel Port Programming??? Pin
Dave Kreskowiak24-Jan-06 5:29
mveDave Kreskowiak24-Jan-06 5:29 
GeneralRe: about Parallel Port Programming??? Pin
flashmemory24-Jan-06 20:27
flashmemory24-Jan-06 20:27 
GeneralRe: about Parallel Port Programming??? Pin
Dave Kreskowiak25-Jan-06 1:46
mveDave Kreskowiak25-Jan-06 1:46 
GeneralRe: about Parallel Port Programming??? Pin
flashmemory25-Jan-06 1:57
flashmemory25-Jan-06 1:57 
GeneralRe: about Parallel Port Programming??? Pin
Dave Kreskowiak25-Jan-06 2:54
mveDave Kreskowiak25-Jan-06 2:54 
AnswerRe: about Parallel Port Programming??? Pin
Freddie Code26-Jan-06 14:23
Freddie Code26-Jan-06 14:23 
QuestionRetrieving Local IP Address Pin
Devraj Raut24-Jan-06 0:32
Devraj Raut24-Jan-06 0:32 
AnswerRe: Retrieving Local IP Address Pin
Owner drawn24-Jan-06 0:50
Owner drawn24-Jan-06 0:50 

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.