Click here to Skip to main content
16,011,585 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvakidation Pin
sumit703422-Jan-08 18:01
sumit703422-Jan-08 18:01 
GeneralRe: vakidation Pin
John_Adams22-Jan-08 18:28
John_Adams22-Jan-08 18:28 
GeneralRe: vakidation Pin
sumit703422-Jan-08 19:59
sumit703422-Jan-08 19:59 
GeneralRe: vakidation Pin
Mycroft Holmes22-Jan-08 18:54
professionalMycroft Holmes22-Jan-08 18:54 
QuestionDataGridView- Pin
bj9308122-Jan-08 17:49
bj9308122-Jan-08 17:49 
GeneralRe: DataGridView- Pin
Scubapro25-Jan-08 8:34
Scubapro25-Jan-08 8:34 
GeneralRe: DataGridView- Pin
bj9308129-Jan-08 11:29
bj9308129-Jan-08 11:29 
GeneralHelp with syntax Pin
MUSIWA22-Jan-08 17:11
MUSIWA22-Jan-08 17:11 
Dim sqlConnection1 As New System.Data.SqlClient.SqlConnection("Data Source=MUSCRIBMPC\SQLEXPRESS;Initial Catalog=adp3SQL;Integrated Security=True")
Dim fname, lname As String
fname = TextBox2.Text
lname = textbox2.text
Dim cmd As New System.Data.SqlClient.SqlCommand
cmd.CommandType = System.Data.CommandType.Text

cmd.CommandText = "update compiledpts set firstname=fname, lastname=lname where contactid = 2"
cmd.Connection = sqlConnection1

sqlConnection1.Open()
cmd.ExecuteNonQuery()
sqlConnection1.Close()

contactid is the table ID, compiledpts is the name of the table. everything else works except the syntax in the commandtext. if firstname is = " anytext " it updates with that text but I cannot use fname and I cannot use more than one viriable. WHAT IS WRONG PLEASE?
GeneralRe: Help with syntax Pin
Tirthadip22-Jan-08 17:52
Tirthadip22-Jan-08 17:52 
GeneralRe: Help with syntax Pin
MUSIWA23-Jan-08 15:17
MUSIWA23-Jan-08 15:17 
Generalimaging Scanner connection through VB Pin
vash22-Jan-08 15:33
vash22-Jan-08 15:33 
Generalcodes for imaging scanner connection VB6 Pin
vash22-Jan-08 15:27
vash22-Jan-08 15:27 
Questionarray controls Pin
Agbaria Ahmad22-Jan-08 11:40
Agbaria Ahmad22-Jan-08 11:40 
GeneralRe: array controls Pin
Mycroft Holmes22-Jan-08 16:38
professionalMycroft Holmes22-Jan-08 16:38 
GeneralRe: array controls Pin
sumit703422-Jan-08 18:19
sumit703422-Jan-08 18:19 
QuestionQuick Help anyone? Pin
MUSIWA22-Jan-08 10:33
MUSIWA22-Jan-08 10:33 
AnswerRe: Quick Help anyone? Pin
pmarfleet22-Jan-08 10:56
pmarfleet22-Jan-08 10:56 
GeneralRe: Quick Help anyone? Pin
MUSIWA22-Jan-08 17:06
MUSIWA22-Jan-08 17:06 
GeneralRe: Quick Help anyone? Pin
pmarfleet22-Jan-08 19:51
pmarfleet22-Jan-08 19:51 
QuestionScreen saver [modified] Pin
mykingdomforanewusername22-Jan-08 6:46
mykingdomforanewusername22-Jan-08 6:46 
QuestionClick Once Deployment Pin
mia514022-Jan-08 4:41
mia514022-Jan-08 4:41 
GeneralRe: Click Once Deployment Pin
Mycroft Holmes22-Jan-08 16:46
professionalMycroft Holmes22-Jan-08 16:46 
GeneralRe: Click Once Deployment Pin
mia514023-Jan-08 4:51
mia514023-Jan-08 4:51 
QuestionHow to know the LAN connection Status. Pin
Hariharan22-Jan-08 2:37
Hariharan22-Jan-08 2:37 
GeneralRe: How to know the LAN connection Status. Pin
Justin Perez22-Jan-08 4:42
Justin Perez22-Jan-08 4:42 

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.