Click here to Skip to main content
16,004,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Enabling autofill in webbrowser control Pin
Ahmad Zaidi10-Mar-08 21:04
Ahmad Zaidi10-Mar-08 21:04 
GeneralRe: Enabling autofill in webbrowser control Pin
Christian Graus10-Mar-08 22:00
protectorChristian Graus10-Mar-08 22:00 
Questionchange listview item numbers Pin
johnny196310-Mar-08 9:27
johnny196310-Mar-08 9:27 
GeneralRe: change listview item numbers Pin
Christian Graus10-Mar-08 10:13
protectorChristian Graus10-Mar-08 10:13 
GeneralVB6 and SQL Server 2000 Pin
mgexpression10-Mar-08 8:56
mgexpression10-Mar-08 8:56 
GeneralRe: VB6 and SQL Server 2000 Pin
Paul Conrad10-Mar-08 16:57
professionalPaul Conrad10-Mar-08 16:57 
General[Message Deleted] Pin
obarahmeh10-Mar-08 6:06
obarahmeh10-Mar-08 6:06 
GeneralRe: Insert to database Pin
Colin Angus Mackay10-Mar-08 6:17
Colin Angus Mackay10-Mar-08 6:17 
obarahmeh wrote:
I want to insert data into SQL 2000, but the code is not working for some reason I do not know.


What do you mean by "not working"? Does it cause an exception? Does it do something different? Does it do nothing?


obarahmeh wrote:
Dim com2 As New SqlClient.SqlCommand("insert into Customers(HOTCODE, HYEAR, HMONTH, HWEEK, NPALEST, NARAB, NISRAELI) " & _
" values(" & Me.SHCODE.Text & "," & Me.SYEAR.Text & "," & Me.SMONTH.Text & "," & Me.NSelectweek.SelectedValue & "," & Me.NPalest.Text & "," & Me.NArab.Text & "," & Me.NIsrael.Text, con)


Don't inject data into your SQL Strings. This leaves you vulernable to SQL Injection Attacks. Please read SQL Injection Attacks and some tips on how to prevent them[^]

I'm guessing that your problem is that some of the user input damages the SQL String which is a symptom of vulernability to SQL Injection Attacks.

Upcoming FREE developer events:
* Developer Day Scotland

Recent blog posts:
* Mixins in C#3.0

My website | Blog

GeneralRe: Insert to database Pin
Christian Graus10-Mar-08 10:14
protectorChristian Graus10-Mar-08 10:14 
GeneralRe: Insert to database Pin
Colin Angus Mackay10-Mar-08 10:22
Colin Angus Mackay10-Mar-08 10:22 
GeneralRe: Insert to database Pin
Christian Graus10-Mar-08 11:24
protectorChristian Graus10-Mar-08 11:24 
GeneralRelation between Dataset and aplication speed Pin
Sipder10-Mar-08 4:34
Sipder10-Mar-08 4:34 
GeneralRe: Relation between Dataset and aplication speed Pin
Christian Graus10-Mar-08 10:16
protectorChristian Graus10-Mar-08 10:16 
GeneralRe: Relation between Dataset and aplication speed Pin
Sipder10-Mar-08 18:40
Sipder10-Mar-08 18:40 
GeneralLate Binding produces DISP_E_MEMBERNOTFOUND when returned from a function Pin
QuickBooksDev10-Mar-08 0:58
QuickBooksDev10-Mar-08 0:58 
GeneralVBA Code for a combo selection Pin
sighto9-Mar-08 23:49
sighto9-Mar-08 23:49 
GeneralRe: VBA Code for a combo selection Pin
Sipder10-Mar-08 4:32
Sipder10-Mar-08 4:32 
GeneralRe: VBA Code for a combo selection Pin
sighto10-Mar-08 22:40
sighto10-Mar-08 22:40 
GeneralCalling Batch file from vb Pin
aaraaayen9-Mar-08 23:03
aaraaayen9-Mar-08 23:03 
GeneralRe: Calling Batch file from vb Pin
_Damian S_10-Mar-08 18:24
professional_Damian S_10-Mar-08 18:24 
GeneralRe: Calling Batch file from vb Pin
aaraaayen10-Mar-08 19:48
aaraaayen10-Mar-08 19:48 
GeneralRe: Calling Batch file from vb Pin
Dave Kreskowiak11-Mar-08 7:56
mveDave Kreskowiak11-Mar-08 7:56 
QuestionSAVING PRINTDOCUMENT/PRINT PREVIEW ?? Pin
vbbeg9-Mar-08 22:55
vbbeg9-Mar-08 22:55 
AnswerRe: SAVING PRINTDOCUMENT/PRINT PREVIEW ?? Pin
Christian Graus9-Mar-08 23:34
protectorChristian Graus9-Mar-08 23:34 
GeneralRe: SAVING PRINTDOCUMENT/PRINT PREVIEW ?? Pin
vbbeg13-Mar-08 4:25
vbbeg13-Mar-08 4:25 

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.