Sry if the title of the thread sucks but I am creating a command incode for my program and I am not sure if I wrote it quite right as i am not sure of how to add a variable to a SQL statement in VB so here is the code can you tell me if it is done right please.
Thx in advance
VB Code:
With m_adoCommandAR .CommandText = "SELECT Square_Name0, Square_Name1, Square_Name2, " & _ "Square_Name3, Square_Name4, Square_Name5, " & _ "Square_Name6, Square_Name7, Square_Name8, " & _ "Square_Name9, FROM Areas WHERE Area_Name = " & _ RoomName 'The variable .CommandType = adCmdText .ActiveConnection = m_adoConnection End With




Reply With Quote