Problem in Sql Command
-
Dear all Dim ProductAdapter As New OleDb.OleDbDataAdapter( _ "SELECT * FROM TCAP WHERE NTCIDCODE LIKE 'VARIABLE' ", _ sConn) ====================================================== I has a ploblem with VARIABLE String. i want to declare variable and replace than VARIABLE Exam : Public const strTest As string = "TEST" i 'm cannot declare strTest variable in sql command like that. Please help and advise me. Many thaks & best regards sriwirko
-
Dear all Dim ProductAdapter As New OleDb.OleDbDataAdapter( _ "SELECT * FROM TCAP WHERE NTCIDCODE LIKE 'VARIABLE' ", _ sConn) ====================================================== I has a ploblem with VARIABLE String. i want to declare variable and replace than VARIABLE Exam : Public const strTest As string = "TEST" i 'm cannot declare strTest variable in sql command like that. Please help and advise me. Many thaks & best regards sriwirko
Declare a variable like strVariable and replace VARIABLE with strVariable but without the single quote. :laugh: Luckyhuss
-
Declare a variable like strVariable and replace VARIABLE with strVariable but without the single quote. :laugh: Luckyhuss
-
Dear all Dim ProductAdapter As New OleDb.OleDbDataAdapter( _ "SELECT * FROM TCAP WHERE NTCIDCODE LIKE 'VARIABLE' ", _ sConn) ====================================================== I has a ploblem with VARIABLE String. i want to declare variable and replace than VARIABLE Exam : Public const strTest As string = "TEST" i 'm cannot declare strTest variable in sql command like that. Please help and advise me. Many thaks & best regards sriwirko
USE
Public const strTest As string = "TEST" Dim ProductAdapter As New OleDb.OleDbDataAdapter( _ "SELECT * FROM TCAP WHERE NTCIDCODE LIKE '" & strTest & "' ", _ sConn)
-
USE
Public const strTest As string = "TEST" Dim ProductAdapter As New OleDb.OleDbDataAdapter( _ "SELECT * FROM TCAP WHERE NTCIDCODE LIKE '" & strTest & "' ", _ sConn)