Click here to Skip to main content
15,892,674 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: PrintPrivew Problem in MDI Form Pin
szaidi8-Oct-04 4:39
szaidi8-Oct-04 4:39 
GeneralRS-232 event Pin
mannett7-Oct-04 8:52
mannett7-Oct-04 8:52 
GeneralRe: RS-232 event Pin
Dave Kreskowiak7-Oct-04 10:11
mveDave Kreskowiak7-Oct-04 10:11 
GeneralFor Next issues Pin
KreativeKai7-Oct-04 7:09
professionalKreativeKai7-Oct-04 7:09 
Generaladd subreport in crystal report Pin
nitin_ion6-Oct-04 21:11
nitin_ion6-Oct-04 21:11 
Generaladd txt file to sql db using vb6.0 Pin
Mohammed Bassam Dab'an6-Oct-04 19:54
sussMohammed Bassam Dab'an6-Oct-04 19:54 
Generaladd text file to sql database, VB6.0 Pin
Mohammad Daba'an6-Oct-04 19:36
Mohammad Daba'an6-Oct-04 19:36 
GeneralRe: add text file to sql database, VB6.0 Pin
Dave Kreskowiak7-Oct-04 0:30
mveDave Kreskowiak7-Oct-04 0:30 
I'm not even ogin to attempt to compile this. We've said it here on the board dozens of times.

NEVER use string concantenation to put together an SQL statement! There is absolutely no reason to do it.

Now, the reason your SQL is failing is probably because there is an ' character in your text file. That's all that is required to destroy your SQL statement.

The fix will be to use parameterized queries. This is virtually the only method you can use to guarantee that the contents of the text file will get processed properly and not screw up your SQL statement.

See Calling a Stored Procedure with a Command[^] on MSDN for an example.


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

GeneralRe: add text file to sql database, VB6.0 Pin
Mohammad Daba'an7-Oct-04 2:45
Mohammad Daba'an7-Oct-04 2:45 
GeneralRe: add text file to sql database, VB6.0 Pin
Mohammad Daba'an7-Oct-04 4:08
Mohammad Daba'an7-Oct-04 4:08 
GeneralRe: add text file to sql database, VB6.0 Pin
Dave Kreskowiak7-Oct-04 5:40
mveDave Kreskowiak7-Oct-04 5:40 
GeneralRe: add text file to sql database, VB6.0 Pin
Mohammad Daba'an8-Oct-04 6:34
Mohammad Daba'an8-Oct-04 6:34 
GeneralRe: add text file to sql database, VB6.0 Pin
Dave Kreskowiak8-Oct-04 7:18
mveDave Kreskowiak8-Oct-04 7:18 
GeneralRe: add text file to sql database, VB6.0 Pin
Mohammad Daba'an8-Oct-04 22:09
Mohammad Daba'an8-Oct-04 22:09 
GeneralRe: add text file to sql database, VB6.0 Pin
Dave Kreskowiak11-Oct-04 4:23
mveDave Kreskowiak11-Oct-04 4:23 
GeneralBad GAC! Bad! ...or... COM Object Problem with VB.Net Pin
Mike the Red6-Oct-04 6:38
Mike the Red6-Oct-04 6:38 
GeneralRe: Bad GAC! Bad! ...or... COM Object Problem with VB.Net Pin
Steven Campbell6-Oct-04 11:59
Steven Campbell6-Oct-04 11:59 
GeneralRe: Bad GAC! Bad! ...or... COM Object Problem with VB.Net Pin
Mike the Red7-Oct-04 7:58
Mike the Red7-Oct-04 7:58 
GeneralVB6 and API calls Pin
aslm6-Oct-04 3:50
aslm6-Oct-04 3:50 
GeneralRe: VB6 and API calls Pin
Anonymous6-Oct-04 12:24
Anonymous6-Oct-04 12:24 
GeneralProblem in "LookupAccountName" function Pin
zeemalik6-Oct-04 0:33
zeemalik6-Oct-04 0:33 
QuestionWH_CBT Global hook? Pin
Hadi Fakhreddine5-Oct-04 20:26
Hadi Fakhreddine5-Oct-04 20:26 
AnswerRe: WH_CBT Global hook? Pin
Anonymous6-Oct-04 11:03
Anonymous6-Oct-04 11:03 
GeneralRe: WH_CBT Global hook? Pin
Hadi Fakhreddine7-Oct-04 20:27
Hadi Fakhreddine7-Oct-04 20:27 
GeneralRe: WH_CBT Global hook? Pin
Anonymous11-Oct-04 9:26
Anonymous11-Oct-04 9:26 

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.