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

Visual Basic

 
GeneralRe: Bold From FontDialog Pin
Dave Kreskowiak23-Mar-10 1:11
mveDave Kreskowiak23-Mar-10 1:11 
QuestionIncorrect syntax Pin
fresh120721-Mar-10 10:54
fresh120721-Mar-10 10:54 
AnswerRe: Incorrect syntax Pin
Luc Pattyn21-Mar-10 11:22
sitebuilderLuc Pattyn21-Mar-10 11:22 
AnswerRe: Incorrect syntax Pin
DaveAuld21-Mar-10 11:37
professionalDaveAuld21-Mar-10 11:37 
GeneralRe: Incorrect syntax Pin
fresh120721-Mar-10 18:06
fresh120721-Mar-10 18:06 
GeneralRe: Incorrect syntax Pin
εїзεїзεїз21-Mar-10 19:38
εїзεїзεїз21-Mar-10 19:38 
GeneralRe: Incorrect syntax Pin
Steven J Jowett22-Mar-10 3:03
Steven J Jowett22-Mar-10 3:03 
GeneralRe: Incorrect syntax Pin
fresh120722-Mar-10 7:43
fresh120722-Mar-10 7:43 
Yes I have already removed the ' from the column names. I removed the spaces also. But I am still getting the error "Invalid column name". I only get the error for the fields I put letters in. I don't get the error for the numeric fields. Again, when I enter numbers in all of the fields, the insert works fine. The data type is set to VARCHAR for all of the columns so the field should accept letters also. I don't know wha the problem is. Here is my code as modified from the previous post:

Dim myConnection As New SqlClient.SqlConnection
myConnection.ConnectionString = "Data Source=S10615-10\SQLEXPRESS;InitialCatalog=Assessment;Integrated Security=SSPI;"

Dim myCommand As SqlClient.SqlCommand
Dim strSQL As String

myConnection.Open()


strSQL = "INSERT INTO AssessmentPage1 (ClientName, DOB, MedicalRecords, MedicaidNumber, ConsumersName, MedicaidNumber1, ConsumersID, Clinicians, ParentsName, Address, Clinicians1, PhoneNumbers, DateofReferral, DateofAssessment, SchoolName, IdentifyingInformation, PresentingProblems, ReferralInformation) VALUES(" & TextBox1.Text & "," & TextBox2.Text & "," & TextBox3.Text & "," & TextBox4.Text & "," & TextBox5.Text & "," & TextBox6.Text & "," & TextBox7.Text & "," & TextBox8.Text & "," & TextBox9.Text & "," & TextBox10.Text & "," & TextBox11.Text & "," & TextBox12.Text & "," & TextBox13.Text & "," & TextBox14.Text & "," & TextBox15.Text & "," & TextBox16.Text & "," & TextBox17.Text & "," & TextBox18.Text & ")"

myCommand = New SqlClient.SqlCommand(strSQL, myConnection)
myCommand.ExecuteNonQuery()

myConnection.Close()
myCommand.Dispose()
myConnection.Dispose()

GeneralRe: Incorrect syntax Pin
David Skelly22-Mar-10 23:15
David Skelly22-Mar-10 23:15 
QuestionScreen sizes Pin
offroaderdan21-Mar-10 2:58
offroaderdan21-Mar-10 2:58 
AnswerRe: Screen sizes Pin
DaveAuld21-Mar-10 3:27
professionalDaveAuld21-Mar-10 3:27 
GeneralRe: Screen sizes Pin
offroaderdan21-Mar-10 7:56
offroaderdan21-Mar-10 7:56 
GeneralRe: Screen sizes Pin
Dalek Dave21-Mar-10 8:05
professionalDalek Dave21-Mar-10 8:05 
GeneralRe: Screen sizes Pin
Dalek Dave21-Mar-10 13:50
professionalDalek Dave21-Mar-10 13:50 
GeneralRe: Screen sizes Pin
David Skelly21-Mar-10 23:05
David Skelly21-Mar-10 23:05 
GeneralRe: Screen sizes Pin
Dalek Dave21-Mar-10 23:10
professionalDalek Dave21-Mar-10 23:10 
GeneralRe: Screen sizes Pin
DaveAuld21-Mar-10 9:20
professionalDaveAuld21-Mar-10 9:20 
GeneralRe: Screen sizes Pin
offroaderdan21-Mar-10 10:01
offroaderdan21-Mar-10 10:01 
GeneralRe: Screen sizes Pin
DaveAuld21-Mar-10 10:24
professionalDaveAuld21-Mar-10 10:24 
GeneralRe: Screen sizes Pin
offroaderdan21-Mar-10 10:34
offroaderdan21-Mar-10 10:34 
GeneralRe: Screen sizes Pin
Mycroft Holmes21-Mar-10 20:59
professionalMycroft Holmes21-Mar-10 20:59 
QuestionParallel Port Interfacing using Visual Basic Pin
Fahimul720-Mar-10 11:03
Fahimul720-Mar-10 11:03 
AnswerRe: Parallel Port Interfacing using Visual Basic Pin
Luc Pattyn20-Mar-10 11:27
sitebuilderLuc Pattyn20-Mar-10 11:27 
GeneralRe: Parallel Port Interfacing using Visual Basic Pin
Fahimul720-Mar-10 11:53
Fahimul720-Mar-10 11:53 
GeneralRe: Parallel Port Interfacing using Visual Basic Pin
Luc Pattyn20-Mar-10 12:21
sitebuilderLuc Pattyn20-Mar-10 12:21 

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.