Click here to Skip to main content
15,880,405 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 1:05
ago248629-Mar-18 1:05 
GeneralRe: How to print a recording Pin
OriginalGriff29-Mar-18 1:24
mveOriginalGriff29-Mar-18 1:24 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 1:27
ago248629-Mar-18 1:27 
GeneralRe: How to print a recording Pin
OriginalGriff29-Mar-18 1:36
mveOriginalGriff29-Mar-18 1:36 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 2:35
ago248629-Mar-18 2:35 
GeneralRe: How to print a recording Pin
OriginalGriff29-Mar-18 2:46
mveOriginalGriff29-Mar-18 2:46 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 4:04
ago248629-Mar-18 4:04 
GeneralRe: How to print a recording Pin
OriginalGriff29-Mar-18 4:25
mveOriginalGriff29-Mar-18 4:25 
Have a google for Parameterized queries - there is a lot out there.
But basically:
C#
using (SqlConnection con = new SqlConnection(strConnect))
    {
    con.Open();
    using (SqlCommand cmd = new SqlCommand("INSERT INTO myTable (myColumn1, myColumn2) VALUES (@C1, @C2)", con))
        {
        cmd.Parameters.AddWithValue("@C1", myValueForColumn1);
        cmd.Parameters.AddWithValue("@C2", myValueForColumn2);
        cmd.ExecuteNonQuery();
        }
    }

Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: How to print a recording Pin
ago248629-Mar-18 4:33
ago248629-Mar-18 4:33 
GeneralRe: How to print a recording Pin
ago248629-Mar-18 5:15
ago248629-Mar-18 5:15 
GeneralRe: How to print a recording Pin
ago248611-Apr-18 0:35
ago248611-Apr-18 0:35 
GeneralRe: How to print a recording Pin
ago248611-Apr-18 0:37
ago248611-Apr-18 0:37 
QuestionSerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 3:28
ibrahimayhans28-Mar-18 3:28 
AnswerRe: SerialPort DataReceived Event Read Byte ? Pin
Richard MacCutchan28-Mar-18 3:54
mveRichard MacCutchan28-Mar-18 3:54 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:00
ibrahimayhans28-Mar-18 4:00 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 4:17
mveOriginalGriff28-Mar-18 4:17 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:24
ibrahimayhans28-Mar-18 4:24 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 4:26
mveOriginalGriff28-Mar-18 4:26 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:28
ibrahimayhans28-Mar-18 4:28 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 4:43
mveOriginalGriff28-Mar-18 4:43 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:48
ibrahimayhans28-Mar-18 4:48 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
OriginalGriff28-Mar-18 5:01
mveOriginalGriff28-Mar-18 5:01 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:30
ibrahimayhans28-Mar-18 4:30 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
Richard MacCutchan28-Mar-18 4:40
mveRichard MacCutchan28-Mar-18 4:40 
GeneralRe: SerialPort DataReceived Event Read Byte ? Pin
ibrahimayhans28-Mar-18 4:44
ibrahimayhans28-Mar-18 4:44 

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.