Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
QuestionRestSharp poser Pin
pkfox18-Apr-20 8:57
professionalpkfox18-Apr-20 8:57 
AnswerRe: RestSharp poser Pin
Gerry Schmitz18-Apr-20 11:04
mveGerry Schmitz18-Apr-20 11:04 
GeneralRe: RestSharp poser Pin
pkfox18-Apr-20 22:00
professionalpkfox18-Apr-20 22:00 
QuestionStatus Of Printing Files Pin
Member 1480498517-Apr-20 2:59
Member 1480498517-Apr-20 2:59 
AnswerRe: Status Of Printing Files Pin
Richard Deeming17-Apr-20 3:51
mveRichard Deeming17-Apr-20 3:51 
QuestionJoin 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 3:59
Member 1266420916-Apr-20 3:59 
AnswerRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 4:01
mveRichard Deeming16-Apr-20 4:01 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 4:10
Member 1266420916-Apr-20 4:10 
Im trying to make loadData to datagridview in c#. Is there something wrong on my code?

public void LoadRec()
        {
            try
            {

                int i = 0;
                dgvProduct.Rows.Clear();
                _sqlConn.Open();
                _sqlCmd = new SqlCommand("SELECT p.pcode, p.pdesc, b.brand, c.category, p.price, p.qty FROM tblProduct as p inner join tblBrand as b on b.id = p.bid inner join tblCategory as c on c.id = p.cid where p.pdesc like '" + txtSearchProd.Text + "%'", _sqlConn);
                _sqlDR = _sqlCmd.ExecuteReader();
                while (_sqlDR.Read())
                {
                    i++;
                    dgvProduct.Rows.Add(i, _sqlDR[0].ToString(), _sqlDR[1].ToString(), _sqlDR[2].ToString(), _sqlDR[3].ToString(), _sqlDR[4].ToString(), _sqlDR[5].ToString());
                }

                _sqlDR.Close();
                _sqlConn.Close();
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            _sqlConn.Close();
        }

GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 4:23
mveRichard Deeming16-Apr-20 4:23 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 5:07
Member 1266420916-Apr-20 5:07 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 5:10
mveRichard Deeming16-Apr-20 5:10 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
OriginalGriff16-Apr-20 5:37
mveOriginalGriff16-Apr-20 5:37 
Questionfilling a column with property value of object Pin
Aresto196414-Apr-20 20:39
Aresto196414-Apr-20 20:39 
AnswerRe: filling a column with property value of object Pin
joost.versteegen14-Apr-20 20:52
joost.versteegen14-Apr-20 20:52 
GeneralRe: filling a column with property value of object Pin
Aresto196415-Apr-20 3:33
Aresto196415-Apr-20 3:33 
AnswerRe: filling a column with property value of object Pin
OriginalGriff14-Apr-20 21:34
mveOriginalGriff14-Apr-20 21:34 
QuestionTarga files displayed in openFileDialog Pin
MikeBr13-Apr-20 22:26
MikeBr13-Apr-20 22:26 
AnswerRe: Targa files displayed in openFileDialog Pin
OriginalGriff13-Apr-20 23:19
mveOriginalGriff13-Apr-20 23:19 
AnswerRe: Targa files displayed in openFileDialog Pin
Richard Deeming14-Apr-20 0:15
mveRichard Deeming14-Apr-20 0:15 
AnswerRe: Targa files displayed in openFileDialog Pin
Dave Kreskowiak14-Apr-20 4:37
mveDave Kreskowiak14-Apr-20 4:37 
QuestionProgramming Tcp with C# Pin
Member 1478193513-Apr-20 21:13
Member 1478193513-Apr-20 21:13 
AnswerRe: Programming Tcp with C# Pin
OriginalGriff13-Apr-20 21:25
mveOriginalGriff13-Apr-20 21:25 
GeneralRe: Programming Tcp with C# Pin
Member 1478193519-Apr-20 3:24
Member 1478193519-Apr-20 3:24 
QuestionSaving usercontrol design-time properties Pin
Crazy Joe Devola13-Apr-20 14:49
Crazy Joe Devola13-Apr-20 14:49 
AnswerRe: Saving usercontrol design-time properties Pin
OriginalGriff13-Apr-20 20:00
mveOriginalGriff13-Apr-20 20:00 

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.