Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay9-Jun-06 11:20
Colin Angus Mackay9-Jun-06 11:20 
AnswerRe: C#/SQL Question Pin
malikjhangirahmed@hotmail.com7-Jun-06 7:21
malikjhangirahmed@hotmail.com7-Jun-06 7:21 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 8:14
Colin Angus Mackay7-Jun-06 8:14 
AnswerRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 8:11
Colin Angus Mackay7-Jun-06 8:11 
QuestionRe: C#/SQL Question Pin
leckey7-Jun-06 8:15
leckey7-Jun-06 8:15 
AnswerRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 8:29
Colin Angus Mackay7-Jun-06 8:29 
GeneralRe: C#/SQL Question Pin
leckey7-Jun-06 8:36
leckey7-Jun-06 8:36 
GeneralRe: C#/SQL Question Pin
leckey7-Jun-06 8:55
leckey7-Jun-06 8:55 
Colin--I entered the code you provided...

private void btnSearchPartNumber_Click(object sender, System.EventArgs e)
{
strPartNumberInput = txtPartNumber.Text;
Convert.ToInt32(strPartNumberInput);
string SQLString = "Select * FROM Costs where Costs.PartID = @PartID";
SqlCommand cmd = new SqlCommand();
cmd.Connection = myConnection;
cmd.CommandText = SQLString;
cmd.Parameters.Add = ("@PartID", strPartNumberInput);
//Call and build grid
BindGrid(strConnectSQL, SQLString, DataGrid1);
}

However, I am getting a compiling error where I bolded the strPartNumberInput. I'm getting 'expected ;' What am I missing here?
GeneralRe: C#/SQL Question Pin
Josh Smith7-Jun-06 9:01
Josh Smith7-Jun-06 9:01 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 9:03
Colin Angus Mackay7-Jun-06 9:03 
GeneralRe: C#/SQL Question Pin
leckey7-Jun-06 9:16
leckey7-Jun-06 9:16 
GeneralRe: C#/SQL Question Pin
Josh Smith7-Jun-06 9:29
Josh Smith7-Jun-06 9:29 
GeneralRe: C#/SQL Question Pin
leckey7-Jun-06 9:31
leckey7-Jun-06 9:31 
GeneralRe: C#/SQL Question [modified] Pin
Josh Smith7-Jun-06 9:38
Josh Smith7-Jun-06 9:38 
GeneralRe: C#/SQL Question--New Problem Pin
leckey7-Jun-06 9:47
leckey7-Jun-06 9:47 
GeneralRe: C#/SQL Question--New Problem Pin
Josh Smith7-Jun-06 9:51
Josh Smith7-Jun-06 9:51 
GeneralRe: C#/SQL Question--New Problem Pin
leckey7-Jun-06 9:58
leckey7-Jun-06 9:58 
GeneralRe: C#/SQL Question--New Problem Pin
Josh Smith7-Jun-06 10:12
Josh Smith7-Jun-06 10:12 
GeneralRe: C#/SQL Question--New Problem Pin
leckey7-Jun-06 10:20
leckey7-Jun-06 10:20 
GeneralRe: C#/SQL Question--New Problem Pin
Josh Smith7-Jun-06 10:38
Josh Smith7-Jun-06 10:38 
GeneralRe: C#/SQL Question--New Problem Pin
leckey7-Jun-06 10:44
leckey7-Jun-06 10:44 
GeneralRe: C#/SQL Question--New Problem Pin
Josh Smith7-Jun-06 10:54
Josh Smith7-Jun-06 10:54 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 12:23
Colin Angus Mackay7-Jun-06 12:23 
GeneralRe: C#/SQL Question Pin
leckey8-Jun-06 3:32
leckey8-Jun-06 3:32 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay8-Jun-06 8:28
Colin Angus Mackay8-Jun-06 8:28 

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.